Increased biomass and yield of plants grown under elevated [CO ] often corresponds to decreased grain N concentration ([N]), diminishing nutritional quality of crops. Legumes through their symbiotic N fixation may be better able to maintain biomass [N] and grain [N] under elevated [CO ], provided N fixation is stimulated by elevated [CO ] in line with growth and yield. In Mediterranean-type agroecosystems, N fixation may be impaired by drought, and it is unclear whether elevated [CO ] stimulation of N fixation can overcome this impact in dry years. To address this question, we grew lentil under two [CO ] (ambient ~400 ppm and elevated ~550 ppm) levels in a free-air CO enrichment facility over two growing seasons sharply contrasting in rainfall. Elevated [CO ] stimulated N fixation through greater nodule number (+27%), mass (+18%), and specific fixation activity (+17%), and this stimulation was greater in the high than in the low rainfall/dry season. Elevated [CO ] depressed grain [N] (-4%) in the dry season. In contrast, grain [N] increased (+3%) in the high rainfall season under elevated [CO ], as a consequence of greater post-flowering N fixation. Our results suggest that the benefit for N fixation from elevated [CO ] is high as long as there is enough soil water to continue N fixation during grain filling.