The riparian ecosystem is highly susceptible to pollution, particularly heavy metals (HMs), due to its unique spatial position and landscape characteristics. Therefore, assessing the risks of HM pollution and identifying potential sources are crucial for formulating effective prevention and control measures. This study investigates the characteristics of HMs (Ni, Cr, Zn, Cd, Cu, Pb) pollution in the Weihe River riparian zone, identifies their sources, and assesses the associated ecological and human health risks. The results indicate that Ni, Zn, and Cd are the primary pollutants in riparian soil, with the average Cd concentration being 5.64 times higher than the background value, indicating a high potential ecological risk. Spatially, the average HM concentrations in the middle and upper reaches are higher than in the lower reaches. Vertically, as the distance from the riparian increases, the HM content exhibits a “U”-shaped pattern (increase-decrease-increase). The Absolute principal components multiple regression (APCS-MLR) receptor model identified four potential pollution sources: traffic sources; agricultural sources; industrial sources; and natural sources. Additionally, the Monte Carlo simulation-based human health risk assessment indicates that the non-carcinogenic health risk indices for all HMs are within acceptable ranges. For carcinogenic health risk indices, there is a 1.14% probability for children. However, the vast majority of the risks fall within acceptable or no-risk categories.