The concentrations of As, Cd, Cr, Cu, Pb, Ni, Zn, and Hg in 128 surface soil samples from Xiangfen County, Shanxi Province, China were measured. The concentrations of these eight heavy metals were lower than the critical values in the national soil quality standard. However, these concentrations were found to be slightly higher than their background values in soils in Shanxi Province, indicating enrichment of these metals in soils in Xiangfen County, especially for Hg and Cd. Principal component analysis coupled with cluster analysis was used to analyze the data and identify possible sources of these heavy metals; the results showed that the eight heavy metals in soils from Xiangfen County came from three different sources. Lead, Cd, Cu and Zn mainly arose from agricultural practices and vehicle emissions. Arsenic and Ni arose mainly from parent materials. Industrial practices were the main sources of Cr and Hg. The spatial distribution of the heavy metals varied greatly, and was closely correlated to local anthropogenic activities. This study will be helpful not only for improving local soil environmental quality but will also provide a basis for effectively targeting policies to protect soils from long-term heavy metal accumulation.