Purpose: Endometriosis is a prevalent gynecological disorder, yet data on the role of trace metal elements in its risk remain limited. We aimed to investigate the relationship between serum copper (Cu), zinc (Zn), iron (Fe), magnesium (Mg) levels, and the Cu/Zn ratio with the risk of endometriosis. Methods: This study involved 568 infertile patients diagnosed with endometriosis, compared to 819 infertile patients without endometriosis (Control group). Basic characteristics, hormonal parameters, and essential trace elements of the patients were measured and analyzed. Results: The findings indicated a notable decrease in serum Zn levels in the endometriosis group compared to controls, alongside a significant increase in the Cu/Zn ratio (p < 0.001). Restricted cubic spline (RCS) analysis revealed a linear relationship between Zn levels and the Cu/Zn ratio and endometriosis risk. Moreover, Zn levels exhibited a negative correlation with endometriosis risk (p trend = 0.005), while the Cu/Zn ratio displayed a positive correlation with endometriosis risk, even after adjusting for age, body mass index (BMI), and baseline hormones (p trend < 0.001). Compared to the first quartile of Cu/Zn ratio after adjustment, the odds ratios (ORs) with 95% confidence intervals (CIs) for the second and fourth quartiles were 1.97 (1.37, 2.83) and 2.63 (1.80, 3.84), respectively. Conclusions: This study provided evidence of decreased serum Zn levels and an increased Cu/Zn ratio being associated with an elevated risk of endometriosis among infertile patients. These findings offer valuable real-world data, enriching our understanding of endometriosis.