Heavy metals, such as mercury, cadmium, and nickel, may contaminate human inhabited environments, with critical consequences for human health. This study examines the health impacts of heavy metal pollution from an iron slag pile in Hechi, China, by analyzing heavy metal contamination in water, sediment, soil, and crops. Here, the Nemerow pollution index (NI) indicated severe pollution at most sampling sites, the mean NI of groundwater, and surface water had reached 594.13 and 26.79, respectively. Bioaccumulation of mercury (Hg), cadmium (Cd), and nickel (Ni) was noted in crops, cucumbers showed comparatively lower risk levels. Logarithmic surface water-sediment partition coefficient calculations indicated that heavy metals such as chromium (Cr), ferrum (Fe), zinc (Zn), copper (Cu), Ni, arsenic (As), and lead (Pb) tend to accumulate in sediments. There was a high risk in groundwater (67.48–6590.54) and surface water (13.73–2500.85). Variably influenced by rainfall, these metals can be diluted and mobilized from surface water and sediments, thereby changing the contamination levels and ecological risks. Probabilistic health risk assessments indicated that health risks were higher in children than in adults, the mean total carcinogenic risk values of soil, groundwater, and surface water, were 6.79E-04, 4.20E-06, and 1.15E-6 for children, respectively. Moderate soil pollution is the main health hazard. A Positive Matrix Factorization model attributed over 60% of the pollution to slag stacking. Biotechnologies, solidification/stabilization techniques, field management, and institutional controls, driven by principles of green, low-carbon, and economic efficiency may mitigate. These findings contribute to the management of heavy metal pollution in iron slag pile areas.