CYP17A1 is a cytochrome P450 enzyme that has 17-alpha-hydroxylase and C17,20-lyase activities. Cyp17a11 deficiency is associated with high body mass and visceral fat deposition in atherosclerotic female ApoE knockout (KO, d/d or -/-) mice. In the present study, we aimed to investigate the effects of diet and Cyp17a1 genotype on the gut microbiome. Female Cyp17a1 (d/d) × ApoE (d/d) (DKO) and ApoE (d/d) (controls) were fed either standard chow or a Western-type diet (WTD), and we demonstrated the effects of genetics and diet on the body mass of the mice and composition of their gut microbiome. We found a significantly lower alpha diversity after accounting for the ecological network structure in DKO mice and WTD-fed mice compared with chow-fed ApoE(d/d). Furthermore, we found a strong significant positive association of the Firmicutes vs. Bacteroidota ratio with body mass and the circulating total cholesterol and triglyceride concentrations of the mice when feeding the WTD, independent of the Cyp17a1 genotype. Further pathway enrichment and network analyses revealed a substantial effect of Cyp17a1 genotype on associated cardiovascular and obesity-related pathways involving aspartate and L-arginine. Future studies are required to validate these findings and further investigate the role of aspartate/L-arginine pathways in the obesity and body fat distribution in our mouse model.