Diabetes and impaired fasting glucose (IFG) are significant global health concerns. However, the potential effects of mixed heavy metal exposure on these conditions remain underexplored. This study aims to investigate the combined effects of multiple metals on diabetes risk and explore the mediating role of Body Mass Index (BMI) in rural China. A cross-sectional analysis involved 2313 adults from 12 provinces in rural China. Urinary levels of zinc (Zn), chromium (Cr), nickel (Ni), cadmium (Cd), and lead (Pb) were quantified using inductively coupled plasma mass spectrometry. Fasting blood glucose (FBG) levels were measured with an automatic biochemical analyzer. Logistic regression models and the Bayesian Kernel Machine Regression (BKMR) model were used to examine associations and interactions. Mediation analysis was performed to assess the role of BMI. The results of our study indicate that there is a significant association between urinary Zn (OR = 2.38, 95 % CI: 1.57, 3.60), Cr (OR = 1.24, 95 % CI: 1.31, 1.61), and Ni (OR = 1.51, 95 % CI: 1.05, 2.18) and the diabetes risk. The study revealed that exposure to Ni amplified the associations between Zn, Cr and diabetes/IFG risk. Additionally, BMI was identified as a significant mediator in the relationship between metal exposure, particularly Cr/Cd, and diabetes risk. These findings reveal a complex link between multiple metals, such as Zn, Cr, and Ni, and diabetes risk, and emphasize the potential opposite mediating effects of BMI in different metal-induced diabetes mechanisms. Further investigation of these mechanisms is warranted.