Understanding the impact of different industrial activities on heavy metals and conducting scientific ecological risk assessments are critical to the management of heavy metal pollution. The present study compared soils affected by different industrial activities in three types of industrial cities (coal city, oil-gas city, and economic city) to control samples and examined the ecological risk based on bioavailability in the Middle Yellow River Basin. The findings revealed that the impact characteristics of different industrial activities on soil heavy metals in the research area were different. Both coal-based and oil-gas industry activities had a minor impact on soil heavy metals, whereas economic industry activities in the southern part had a major impact, as evidenced by significant enrichment of Cd, Hg, Cu, Pb, and Zn. In principal component analysis, the soil heavy metals affected by economic industry activities designated a distinct source from the control samples, particularly the anthropogenic sources represented by Hg and Cd. In the context of heavy metals in chemical form, three types of industrial activities all had an effect on bioavailability (0.72–24.27%) and could increase migratory activity in the environment. Furthermore, both traditional and improved assessments, based on total content and bioavailability, showed a low ecological risk near coal cities and oil-gas cities in the middle and northern parts, while there was a medium-high ecological risk near economically developed cities in the south, particularly Tianshui, Baoji, Qishan, Xianyang, Xi'an, and Tongchuan. In comparison, improved risk assessment based on bioavailability tends to not only compensate for an overestimation in traditional risk assessment from the perspective of total content, but additionally achieve a more reasonable, effective, and advanced assessment of heavy metal risks in scientific research. The outcome of this study has significance for the ecological conservation and high-quality development of the Yellow River Basin.