Early pregnancy loss (EPL) may result from exposure to emerging contaminants (ECs), although the underlying mechanisms remain poorly understood. This case-control study measured over 2000 serum features, including 37 ECs, 6 biochemicals, and 2057 endogenous metabolites, in serum samples collected from 48 EPL patients and healthy pregnant women. The median total concentration of targeted EC in the EPL group (65.9 ng/mL) was significantly higher than in controls (43.0 ng/mL; p < 0.05). Four machine learning algorithms were employed to identify key molecular features and develop EPL risk prediction models. A random forest model based on chemical data achieved a predictive accuracy of 95 %, suggesting a potential association between EPL and chemical exposure, with phthalic acid esters identified as significant contributors. Ninety-five potential metabolite biomarkers were selected, which were predominantly enriched in pathways related to spermidine and spermine biosynthesis, ubiquinone biosynthesis, and pantothenate and coenzyme A biosynthesis. C17-sphinganine was identified as a leading biomarker with an area under the curve of 0.93. Furthermore, exposure to bis(2-ethylhexyl)phthalate was linked to an increased risk of EPL by disrupting lipid metabolism. These findings indicate that combining untargeted metabolomics with machine learning approaches offers novel insights into the mechanisms of EPL related to EC exposure.