IntroductionReforestation is a widely used strategy for ecological restoration in areas facing ecological degradation. Soil bacteria regulate many functional processes in terrestrial ecosystems; however, how they respond to reforestation processes in surface and deep soils remains unclear.MethodsArtificial Robinia pseudoacacia plantation with different stand ages (8, 22, and 32 years) in a typical fallow forest on the Loess Plateau was selected to explore the differential response of soil bacterial community to reforestation in different soil depths (surface 0–200 cm, middle 200–500 cm, and deep 500-100 cm). Soil bacterial diversity, community composition and the co-occurrence patterns, as well as the functions were analyzed.Results and discussionThe results showed that alpha diversity and the presence of biomarkers (keynote species) decreased with the increasing soil depth, with a sharp reduction in family-level biomarker numbers in 500–1,000 cm depth, while reforestation had a positive impact on bacterial alpha diversity and biomarkers. Reforestation induced a more loosely connected bacterial community, as evidenced by an increase of 9.38, 22.87, and 37.26% in the average path length of the co-occurrence network in all three soil layers, compared to farmland. In addition, reforestation reduced the hierarchy and complexity but increased the modularity of the co-occurrence network in top and deep soil layers. Reforestation also led to enrichment in the relative abundance of functional pathways in all soil layers. This study sheds light on the strategies employed by deep soil bacteria in response to reforestation and underscores the significant potential of deep soil bacteria in terrestrial ecosystems, particularly in the context of human-induced environmental changes.