Soil microorganisms play vital roles in ecosystem functions, and soil microbial communities might be affected by heavy metal contamination caused by the anthropogenic activities associated with the coal-based industry. This study explored the effects of heavy metal contamination on soil bacterial and fungal communities surrounding different coal-based industrial fields (the coal mining industry, coal preparation industry, coal-based chemical industry, and coal-fired power industry) in Shanxi province, North China. Moreover, soil samples from farmland and parks away from all the industrial plants were collected as references. The results showed that the concentrations of most heavy metals were greater than the local background values, particularly for arsenic (As), lead (Pb), cadmium (Cd), and mercury (Hg). There were significant differences in soil cellulase and alkaline phosphatase activities among sampling fields. The composition, diversity, and abundance of soil microbial communities among all sampling fields were significantly different, particularly for the fungal community. Actinobacteria, Proteobacteria, Chloroflexi, and Acidobacteria were the predominant bacterial phyla, while Ascomycota, Mortierellomycota, and Basidiomycota dominated the studied fungal community in this coal-based industrially intensive region. A redundancy analysis, variance partitioning analysis, and Spearman correlation analysis revealed that the soil microbial community structure was significantly affected by Cd, total carbon, total nitrogen, and alkaline phosphatase activity. This study profiles the basic features of the soil physicochemical properties, the multiple heavy metal concentrations, and the microbial communities in a coal-based industrial region in North China.