<p dir="ltr">1. Nitrogen fertilization is commonly applied to increase crop yields in agroecosystems, yet it simultaneously threatens the biodiversity of natural communities. However, how nitrogen addition affects diversity in agroecosystems, and the underlying mechanisms through which it modifies competitive interactions, remain unclear.</p><p dir="ltr">2. Here, we conducted a competition experiment between wheat and two weeds (i.e., <a href="" target="_blank"><i>Avena fatua</i> and </a><i>Echinochloa crusgalli</i>) by growing a total of 2490 individuals in a response-surface design with and without nitrogen fertilization. After growth for eight months, we measured individual seed production to parametrize competitive population models, allowing to quantify niche and fitness differences and competitive outcomes. We also measured various functional traits at the individual level, including plant height, three leaf traits (e.g., leaf area, specific leaf area), five root traits (root area, specific root area) with and without nitrogen fertilization.</p><p dir="ltr">3. We found that nitrogen addition facilitated coexistence between wheat and weeds, and the underlying processes differed for the two weed species with distinct functional strategies. Specifically, fertilization increased the niche differences between wheat and the native weed, <i>E. crusgalli</i>., resulting from amplified root area and length differences between them under fertilization. In contrast, the competitive advantage of wheat over the invasive weed, <i>A. fatua</i>, was reduced by nitrogen addition, increasing the likelihood of coexistence between them. This was because the trait responses of <i>A. fatua</i> to nitrogen addition conferred it greater intrinsic growth rates and weakened the height of wheat, highlighting that taller wheat cultivars may be more effective in suppressing <i>A. fatua</i> under fertilization.</p><p dir="ltr"><i>Synthesis and applications</i>. These findings demonstrate that nitrogen addition can affect coexistence through both niche and fitness differences related processes and highlight the importance of trait plasticity for mediating coexistence under varying nutrient conditions. <a href="" target="_blank">Our study provides important insights into the trait-mediated mechanisms of nitrogen-driven crop</a>–weed competition dynamics and offers practical recommendations for selecting wheat varieties that support sustainable weed management under varying fertilization regimes.</p>