Environmental exposure to heavy metals, particularly lead (Pb) and nickel (Ni), is implicated in chronic metabolic diseases, including diabetes mellitus (DM). This cross-sectional study assessed the Pb and Ni levels in groundwater using ICP-OES and urine samples collected from 2688 participants using ICP-MS. We aimed to establish the associations between Pb and Ni exposure and risk factors for DM and metabolic disorders. Groundwater analysis revealed the elevated levels of total dissolved solids, electrical conductivity, hardness, turbidity, Ni, and Pb, exceeding the WHO guidelines. The mean concentration of Pb in groundwater samples of study area was 0.025 mg/L which was higher than the WHO permissible limit of 0.01 mg/L. Similarly the mean concentration of Ni in groundwater samples of study area was 0.038 mg/L which was also higher than the WHO permissible limit of 0.02 mg/L. In human study, participants, categorized into Pb-detected and Ni-detected groups, exhibited significantly higher Pb and Ni levels and non-exposed non-diabetic groups. Ni-detected diabetics showed elevated Ni levels compared to non-exposed non-diabetics. Similarly, Pb-detected diabetics showed elevated Pb levels compared to non-exposed non-diabetics. These findings suggest a potential contribution of Pb and Ni exposure to DM development. The study also identified associations between heavy metal exposure and disruptions in various biomarkers related to DM, lipid profile, inflammation, oxidative stress, liver function, and kidney function. Pb-detected diabetics demonstrated elevated levels of glycemic index biomarkers, including fasting blood glucose (P < 0.0001) and HbA1c (P < 0.0001). Ni-detected diabetics exhibited increased inflammatory markers, such as CRP (P < 0.0001) and IL-6 (P < 0.0001). Both Pb and Ni exposure were associated with dyslipidemia, as indicated by elevated levels of total cholesterol (P < 0.0001) and LDL (P < 0.0001). Additionally, heavy metal exposure was linked to impaired liver and kidney function, supported by elevated levels of AST (P < 0.0001), ALT (P < 0.0001), creatinine (P < 0.0001), and blood urea nitrogen (P < 0.0001), with Pb exposure also associated with higher levels of MDA (P < 0.0001). Correlation analyses demonstrated significant associations between urinary Pb and Ni concentrations and various biomarkers related to DM and metabolic disorders. In conclusion, this study provides substantial evidence linking Pb and Ni exposure to the development of DM and metabolic disorders in a Pakistani population, emphasizing the need for strict regulations and preventive measures to reduce heavy metal contamination and safeguard public health. Future longitudinal studies and interventions are warranted to elucidate mechanistic links between heavy metal exposure and metabolic diseases.