Soil nutrient levels and microbial community structures are critical indicators for evaluating the ecosystem services of artificial forests. In arid and semi-arid regions, which are the major distribution areas for artificial forests, the regulatory effects of stand density on soil nutrients and microbial communities remain poorly understood. This study analyzed a 30-year-old Robinia pseudoacacia plantation on the Loess Plateau’s eastern edge. Based on Reineke’s stand density effect law and regional management standards, the stands were categorized into low (950-1350 trees·hm-2), medium (1600-2050 trees·hm-2), and high (2400-3300 trees·hm-2) density groups. Data were collected through field surveys, soil nutrient analyses, and high-throughput sequencing of 16S rRNA and ITS. These methods systematically assessed the soil nutrient characteristics and microbial community structures and diversity across different stand densities. The study’s findings indicate that as the stand density increases, the soil total nitrogen, nitrate nitrogen, total carbon, and organic carbon contents significantly increase, especially in the high-density group (P<0.05). Conversely, the available phosphorus content peaks in the medium-density group. The bacterial community was primarily composed of Proteobacteria (38.70%), Actinobacteria (19.37%), Gemmatimonadetes (8.23%), and Chloroflexi (7.71%), with Actinobacteria’s relative abundance significantly increasing alongside the stand density (P<0.05). In the fungal community, Ascomycota (51.79%), Mortierellomycota (30.70%), and Basidiomycota (10.07%) were the dominant phyla. In the high-density group, bacterial and fungal community diversity was significantly enhanced, as evidenced by notable increases in the Shannon and Chao1 indices (P<0.05). Principal Coordinates Analysis revealed that the bacterial community structures in the medium- and low-density groups exhibited significant clustering, distinctly differing from those in the high-density group (P<0.05). In contrast, the fungal community structures remained relatively stable across different stand densities. The Mantel test revealed that bacterial and fungal community structures were significantly associated with TN (P<0.05). Cooccurrence network analysis indicated that moderate stand density increases microbial interaction strength and network complexity. However, when the stand density exceeded 2400 trees·hm-2, the network stability decreased, potentially hindering efficient resource utilization. Maintaining a stand density of 1600-2050 trees·hm-2 improves soil nutrient levels and enhances microbial community diversity and stability, providing a scientific basis for the sustainable management of R. pseudoacacia plantations on the Loess Plateau.