Afforestation plays a pivotal role in ecosystem restoration, exemplified by the Saihanba Mechanized Forest Farm, the world's largest planted forest; however, the assembly mechanisms and interactions of soil microbial communities in such forests remain inadequately understood. This study aimed to elucidate the impact of different afforestation tree species, namely Larix gmelinii var. principis-rupprechtii, Picea asperata, and Pinus sylvestris var. mongolica, on soil bacterial diversity and community structure in comparison to grassland. Sixty soil samples were collected at a 20 cm depth, and high-throughput sequencing was employed to identify bacterial communities and assess their interactions with environmental factors. A total of 6528 operational taxonomic units (OTUs) were identified, with Solirubrobacter, Conexibacter, Bacillus, Massilia, Gaiella, Acidibacter, and Vicinamibacter being the dominant genera. Afforestation significantly impacted soil bacterial alpha diversity, with notable influence from key soil chemical properties, including available phosphorus (AP), cation exchange capacity (CEC), and the carbon-to-nitrogen ratio of soil organic matter (SOM-C/N). The Mantel test highlighted pH, the Normalized Difference Vegetation Index (NDVI), and spatial variable (dbMEM) as primary environmental factors influencing dominant bacterial genera. The bacterial community structure demonstrated deterministic homogeneous selection, wherein SOM-C/N emerged as a significant factor influencing the dissimilarity of soil bacterial communities. Furthermore, plantation soils exhibited a more complex network structure than grassland soil, highlighting the crucial role of bacterial communities in vegetation changes and providing valuable insights into their response to environmental factors during the reforestation process.