The way resource availability predictably alters interspecific interactions and may favor one resource‐acquisition strategy over another is critical for understanding context dependency. The ubiquity of nitrogen (N) limitation across terrestrial environments is a driver of plant competition and the association of some plants with N‐fixing bacteria (rhizobia) may alleviate competition with nonfixing plants. Conversely, when available soil N is elevated, competitive advantages imparted by rhizobia are hypothesized to decline because nonfixing species are able to acquire those nutrients readily. We manipulated competition, soil N, and soil microbial inoculation, employing the ground bean Amphicarpaea bracteata, a native annual N‐fixing legume, and jewelweed Impatiens capensis, a native co‐occurring nonfixing annual. We found that legume performance was negatively impacted by interspecific competition, but less so under lower soil N in both the greenhouse and field. The legume invested a greater proportion of resources in rhizobia when competing, but only under low N. Also consistent with predictions, a competition‐by‐microbial‐inoculation interaction demonstrated that negative effects of competition were alleviated by rhizobia. Finally, we detected an interaction between inoculation and fertilization, whereby N addition resulted in increased performance for uninoculated legumes, but a small decline in performance for inoculated plants, the latter likely representing a cost of mutualism. Thus, several lines of evidence point to the legume–rhizobia mutualism being more beneficial under competition and limited soil N. Competing I. capensis, in contrast, benefited from N addition regardless of the addition of soil microbes. In a survey of natural populations, legume and rhizobia growth were positively correlated at population edges (where interspecific competition is expected to be higher, the mutualism is stronger), whereas at population centers we found no association. Isotopic evidence confirmed a higher degree of rhizobial N‐fixation at population edges compared to centers. Taken together, our results demonstrate an important role for the largely private channel of nitrogen in legume competitive performance, but with the benefits imparted by rhizobia being predictably weaker at higher soil fertility. We speculate that alleviation of competitive impacts through resource partitioning is an important and yet largely overlooked aspect of the evolutionary ecology of legume–rhizobia interactions.