Rivers in urban environments are significant components of their ecosystems but remain under threat of pollution from unchecked discharges of industrial sewage and domestic wastewater. Such river pollution, particularly over the longer term involving heavy metals, is an issue of worldwide concern regarding risks to the ecological environment and human health. In this study, we investigate the long-term pollution characteristics of the Huafei River, an important urban river in Kaifeng, China. River sedimentary samples were analyzed, assessing the degree and ecological risk of heavy metal pollution using the geo-accumulation index and potential ecological risk index methods; whilst Pearson’s correlation, principal component, and cluster analyses were used to identify the sources of pollution. The results show that heavy metal concentrations are significantly higher than their corresponding fluvo-aquic soil background values in China, and the geo-accumulation indexes indicate, that of the 8 heavy metals identified, Hg is most prevalent, followed in sequence by Cd > Zn > Cu > Pb > Ni > As > Cr. The potential ecological risk index of the Huafei river is very high, with the potential ecological risk intensity highest in the midstream and downstream sections where it is recommended that pollution control is carried out, especially concerning Hg and Cd. Long-term sequence analysis indicates that Cu and Pb dropped sharply from 1998 to 2017, but rebounded in 2019, and that Zn shows a continuous decreasing trend. Four main sources for the heavy metal contaminants were identified: Cr, Cu, Ni, Pb, Zn and Hg derived mainly from industrial activities, traffic sources and natural sources; Cd originated mainly from industrial and agricultural activities; whilst As was mainly associated with industrial activities. It is anticipated that the findings of this study will provide theoretical references for the effective control and scientific management of heavy metal pollution in the Huafei River and its surrounding areas.