Intercropping peanuts with maize and oilseed rape alters rhizosphere metabolite profiles and enhances nitrogen fixation. Over 8 years, changes in peanut metabolite accumulation (flavonoids and coumarins) boosted growth and nitrogen fixation by free-living bacteria and Bradyrhizobium symbionts. Tailored intercropping can improve soil nitrogen availability through rhizosphere microbiome changes.