The one-time application of slow-release nitrogen fertilizer can not only reduce the labor input, but also reduce the mechanical input cost, and has the characteristics of slow release and reduce volatilization loss. This research is grounded in a localization trial initiated in 2018, which underwent comprehensive analysis utilizing high-throughput sequencing technology to elucidate the mutual feeding mechanism of slow-release nitrogen fertilizer application rate on microbial community structure, network complexity, and maize yield in different root niches (bulk soil, rhizosphere, and endosphere). Soil characteristics, microbial community composition, and collinear network of different ecological niches under slow-release nitrogen fertilizer were analyzed, and the key core species affecting the stability of the microbial network and the factors driving yield were identified. The results showed that nitrogen application increased the diversity of bacteria, and nitrogen application significantly increased the diversity of rhizosphere bacteria and fungi due to rhizosphere effects. Slow-release nitrogen fertilizer increased the complexity of the bacterial network and decreased the complexity of the fungal network, particularly, the network complexity of bacteria and fungi in the rhizosphere was higher than that in the bulk soil and the rhizosphere. The application of slow-release nitrogen fertilizer increased the abundance of Proteobacteria, Bacteroidota, Gemmatimonadota, Actinobacteria, Ascomycota, Basidiomycota and other dominant bacteria. Coordinate soil physical and chemical properties, increase soil enzyme activity and soil nutrients, improve soil microenvironment, regulate microbial community composition, and promote above-ground yield increase, in which nitrogen application, urease, nitrate reductase and nitrate nitrogen are the main driving factors for yield increase. These findings provide a new idea for the mutual feeding mechanism of slow-release nitrogen fertilizer on microbial diversity and yield in different ecological niches. To selection of suitable nitrogen application rate and regional ecological security in the agro-pastoral ecotone.It offers a theoretical framework for establishing optimal nitrogen application rates and ensuring food security in agro-pastoral ecotones.