Coal is a vital basic energy source in China, and rail serving is its major mode of transportation. Heavy metals in street dust surrounding the coal railway do harm to the environment and pose a potential risk to human health. This paper aims to identify the effects of coal transportation hubs on heavy metals in street dust. The geoaccumulation index and ecological risk index were used to assess the contamination levels of the following elements in Yuanping, Shanxi: arsenic (As), cadmium (Cd), chromium (Cr), copper (Cu), mercury (Hg), nickel (Ni), lead (Pb), and zinc (Zn). The levels of contamination of these heavy metals in soils were compared to those in street dust, and the difference between the railway’s and mining’s impacts on dust’s heavy-metal concentrations was explored. The results indicated that Cr and Pb in street dust were mainly affected by coal railway transportation, and the interaction effect of coal railway transportation and mining was greater than either of them alone. A potential control and prevention zone for Cr and Pb extending 1 km to both sides of the railway was identified. This work proves that coal railway transportation has certain effect on heavy metals in street dust and provides a scientific approach for future environmental impact assessments of coal transportation via railway.