This study aimed to evaluate the association of TCs (triclosan (TCS) and triclocarban) exposure with T2DM and glucose metabolism-related indicators and the mediating effect of SOCS3 methylation on their associations. A total of 956 participants (330 T2DM and 626 controls) were included in this case-control study. Logistic regression and generalized linear models were used to assess the effect of TCs on T2DM and glucose metabolism-related indicators. The dose–response relationship between TCs and T2DM was analyzed by restricted cubic spline. Finally, after evaluating the association between TCs and SOCS3 methylation levels, the mediating effect of SOCS3 methylation on the TC−associated T2DM was estimated. Each 1-unit increase in TCS levels was associated with a 13.2% increase in the risk of T2DM (OR = 1.132, 95% CI: 1.062, 1.207). A linear dose–response relationship was found between TCS and T2DM. TCS was negatively associated with Chr17:76356190 methylation. Moreover, mediation analysis revealed that Chr17:76356190 methylation mediated 14.54% of the relationship between TCS exposure and T2DM. Exposure to TCS was associated with a higher prevalence of T2DM. SOCS3 methylation partially mediated the association of TCS with T2DM. Our findings may provide new insights into the treatment of T2DM, and the study of the biological mechanisms of T2DM.