Diet plays critical roles in modulating maternal metabolic health in pregnancy, but is also a source of metabolic-disrupting phthalates and their replacements. We aimed to evaluate whether the effects of better diet quality on favorable maternal metabolic outcomes could be partially explained by lower exposure to phthalates/replacements. At 13 weeks gestation, 295 Illinois women (enrolled 2015-2018) completed a three-month food frequency questionnaire that we used to calculate the Alternative Healthy Eating Index (AHEI)-2010 diet quality index. We quantified 19 metabolites, reflecting exposure to 10 phthalates/replacements, in a pool of five first-morning urine samples collected monthly across pregnancy. We measured 15 metabolic biomarkers in fasting plasma samples collected at 17 weeks gestation, which we reduced to five uncorrelated principal components (PCs), representing adiposity, lipids, cholesterol, inflammation, and growth. We used linear regression to estimate associations of diet quality with [1] phthalates/replacements and [2] metabolic PCs, as well as [3] associations of phthalates/replacements with metabolic PCs. We estimated the proportion of associations between diet quality and metabolic outcomes explained by phthalates/replacements using a causal mediation framework. Overall, every 10-point improvement in AHEI-2010 score was associated with -0.15 (95% CI: -0.27, -0.04) lower adiposity scores, reflecting lower glucose, insulin, C-peptide, leptin, C-reactive protein, but higher adiponectin biomarker levels. Every 10-point increase in diet quality was also associated with 18% (95%CI: 7%, 28%) lower sum of di-2-ethylhexyl terephthalate urinary metabolites (∑DEHTP). Correspondingly, each 18% increase in ∑DEHTP was associated with 0.03 point (95% CI: 0.01, 0.05) higher adiposity PC scores. In mediation analyses, 21% of the inverse relationship between diet quality and adiposity PC scores was explained by lower ∑DEHTP. The favorable impact of diet quality on maternal adiposity biomarkers may be partially attributed to lower metabolite concentrations of DEHTP, a plasticizer allowed to be used in food packaging materials.