The effects of triazine herbicides on glucose metabolism remain unclear. In this study, we aimed to assess the associations between serum triazine herbicides and glycemia-related risk indicators in general adults, and to evaluate the mediating role of natural immunoglobulin M antibodies (IgM) in the above associations among uninfected participants. We measured the concentrations of atrazine, cyanazine, and IgM in serum, as well as fasting plasma glucose (FPG), and fasting plasma insulin in 4423 adult participants from the Wuhan-Zhuhai cohort baseline population, enrolled in 2011–2012. Generalized linear models were used to evaluate the associations of serum triazine herbicides with glycemia-related risk indicators, and mediation analyses were performed to evaluate the mediating role of serum IgM in the above associations. The median levels of serum atrazine and cyanazine were 0.0237 μg/L and 0.0786 μg/L, respectively. Our study found significant positive associations of serum atrazine, cyanazine, and Σtriazine with FPG levels, risk of impaired fasting glucose (IFG), abnormal glucose regulation (AGR), and type 2 diabetes (T2D). Additionally, serum cyanazine and Σtriazine were found to be significant positive associated with the homeostatic model assessment of insulin resistance (HOMA-IR) levels. Significant negative linear relationships were observed in associations of serum IgM with serum triazine herbicides, FPG, HOMA-IR levels, the prevalence of T2D, and AGR (P < 0.05). Furthermore, we observed a significant mediating role by IgM in the associations of serum triazine herbicides with FPG, HOMA-IR, and AGR, with the proportions ranging from 2.96% to 7.71%. To ensure the stability of our findings, we conducted sensitivity analyses in normoglycemic participants and found that the association of serum IgM with FPG and the mediating role by IgM remained stable. Our results suggest that triazine herbicides exposure is positively associated with abnormal glucose metabolism, and decreasing serum IgM may partly mediate these associations.