The impacts of transgenic crops on soil microbiology and fertility are critical in determining their biosafety. While transgenic crops can alter soil microbes, their effects are often context-dependent; therefore, the ecological importance of these changes remains a topic of ongoing research. Using high-throughput sequencing, we investigated the effects of Bacillus thuringiensis (Bt) maize expressing the mcry1Ab and mcry2Ab genes (2A7) on soil nutrient dynamics, as well as the diversity and function of soil microbial communities, including bacteria and fungi, within different soil compartments. Our findings revealed a plant-shaped rhizosphere (RS) microbial community as a result of the selective recruitment of microorganisms from the surrounding environment. The transgene insertion had a significant impact on the RS niche, and several species eventually became associated with Z58 and 2A7 plants. For example, Neocosmospora rubicola fungal and Pantoea dispersa bacterial microorganisms were significantly decreased in the dual Bt-transgenic 2A7 rhizosphere but enriched in the Z58 rhizospheres. The activity of soil enzymes such as urease, invertase, and alkaline phosphatase was boosted by Bt-transgenic 2A7. LefSe analysis identified significant bacterial and fungal biomarker species that were responsible for the differential effects of Bt-transgenic 2A7 and control Z58 within rhizosphere soils. Mantel analysis further demonstrated that the root exudates of 2A7 altered nutrient-acquisition enzymes by influencing biomarker taxa. PICRUSt2 functional characterization revealed a significantly higher abundance of the phosphate-starvation-inducible protein in control Z58 than in Bt-transgenic 2A7. Furthermore, taxonomy, alpha (Shannon diversity), and beta diversity analyses all revealed niche-driven microbial profile differentiation. Niche partitioning also had a significant impact on N- and P-related COGs as well. Our findings suggests that Bt-transgenic 2A7 modulates rhizosphere microbial communities by affecting biomarker taxa and soil enzyme activity. These findings will promote sustainable agriculture practices by advancing our knowledge of the ecological effects of Bt crops on soil microbial communities.