In order to reveal the influence of coal mining activities on the characteristics of bacterial community structure in coal seams, 16S rRNA gene amplicon sequencing technology was used to analyze the bacterial community in the coal mine in Shanxi Province. The results showed that mining activities greatly influenced the α diversity of the microbial community, mainly due to the introduction of surface microorganisms by ventilation and mechanical mining. Actinobacteriota and Proteobacteria accounted for more than 85 % of the phylum level of each bacterial community. At the genus level, the relative abundance varied greatly. In general, Achromobacter, Dietzia, Pseudonocardia, Nesterenkonia, Arthrobacter, Moraxellaceae, Hydrogenophaga and Methylomicrobium were dominant. The bacterial community was divided into three categories, which were distributed in the mining working face, the main airway and tunneling roadways, the roadway roof and the unexposed coal seam.