Belowground interactions mediated by root exudates are critical for the productivity and efficiency of intercropping systems. Herein, we investigated the process of microbial community assembly in maize, peanuts, and shared rhizosphere soil as well as their regulatory mechanisms on root exudates under different planting patterns by combining metabolomic and metagenomic analyses. The results showed that the yield of intercropped maize increased significantly by 21.05% (2020) and 52.81% (2021), while the yield of intercropped peanut significantly decreased by 39.51% (2020) and 32.58% (2021). The nitrogen accumulation was significantly higher in the roots of the intercropped maize than in those of sole maize at 120 days after sowing, it increased by 129.16% (2020) and 151.93% (2021), respectively. The stems and leaves of intercropped peanut significantly decreased by 5.13 and 22.23% (2020) and 14.45 and 24.54% (2021), respectively. The root interaction had a significant effect on the content of ammonium nitrogen (NH4+-N) as well as the activities of urease (UE), nitrate reductase (NR), protease (Pro), and dehydrogenase (DHO) in the rhizosphere soil. A combined network analysis showed that the content of NH4+-N as well as the enzyme activities of UE, NR and Pro increased in the rhizosphere soil, resulting in cyanidin 3-sambubioside 5-glucoside and cyanidin 3-O-(6-Op-coumaroyl) glucoside-5-O-glucoside; shisonin were significantly up-regulated in the shared soil of intercropped maize and peanut, reshaped the bacterial community composition, and increased the relative abundance of Bradyrhizobium. These results indicate that interspecific root interactions improved the soil microenvironment, regulated the absorption and utilization of nitrogen nutrients, and provided a theoretical basis for high yield and sustainable development in the intercropping of maize and peanut.