A series of pollution problems have been caused by the drainage of closed coal mines. This study focuses on the XZ River in Guizhou Province, employing a comprehensive approach involving hydrochemical analysis, mathematical statistics, and one-dimensional water quality modeling to investigate the spatial evolution and source apportionment of heavy metals in karst surface rivers affected by AMD. The average pH, EC, and Eh values of groundwater and surface water in the XZ river basin were 6.27, 331 <i>μ</i>s/cm, 230 mV and 3.86, 1671.57 <i>μ</i>s/cm, 412.71 mV, respectively, indicating severe pollution of surface water by AMD. The study reveals that groundwater in the XZ River Basin is predominantly of the HCO<sub>3</sub>-Ca-Mg type, shifting to HCO<sub>3</sub>-SO<sub>4</sub>-Ca-Mg type with the influx of acid mine wastewater. Utilizing statistical methods for source apportionment analysis indicated that downstream concentrations of Fe, Mn, Zn, Cu, As, and Sr most likely originate from tributaries. Further analysis through one-dimensional water quality simulation confirmed that downstream concentrations of Fe, Mn, Zn, Cu, As, and Sr are attributed to tributaries. This suggests that XZ River is affected by pollution from different coal mines, primarily from coal mine M4, followed by coal mine M1.