Contribution of legumes towards N economy in cereal-based cropping systems is well-known but there has been a gradual decline in the cultivation of grain legumes, threatening sustainability of maize (Zea mays)–wheat (Triticum aestivum) cropping system in north-western India. A study was made to evaluate and quantify the effect of different grain legumes on productivity, profitability, N economy and soil fertility in maize–wheat cropping system at New Delhi during 2002–2004. Five legumes, viz. blackgram (Vigna mungo), greengram (Vigna radiata), cowpea (Vigna unguiculata), groundnut (Arachis hypogaea) and soybean (Glycine max) were either intercropped with maize or grown in sole cropping, and their residues were incorporated before the following crop of wheat, which was grown with varying rates of N, viz. 0, 40, 80 and 120 kg N ha−1. Maize-equivalent productivity was significantly more with intercropped greengram (16.1–29.9%), cowpea (24.8%) and groundnut (11.1–16.6%) than in sole maize. Land equivalent ratio and other competitive functions were favourably influenced with intercropped maize + greengram and maize + cowpea. Addition of N through legume residues varied from 11.5–38.5 kg ha−1 in intercropped system and 17.5–83.5 kg ha−1 in sole cropping, which improved productivity of following wheat to a variable extent. Nitrogen economy in wheat was 21 kg ha−1 due to residue incorporation of intercropped greengram, cowpea and groundnut; and 49–56 kg N ha−1 of sole cropped greengram and groundnut. Residual soil fertility in terms of organic C and KMnO4-N showed an improvement under maize-based intercropping systems followed by wheat, and the beneficial effect was more pronounced with sole cropping of legumes due to greater addition of residues. Apparent N balance as well as actual change in KMnO4-N at the end of study was positive in most intercropped legumes as well as sole cropping systems, with greater improvement noticed under groundnut, soybean and greengram. Net returns were marginal with maize-based intercropping or sole cropping of legumes, but improved considerably with wheat, particularly when greengram, cowpea and groundnut were grown in the previous season. The studies suggested that inclusion of grain legumes, particularly greengram, cowpea and groundnut was beneficial for improving productivity, profitability, N economy and soil fertility in maize–wheat cropping system.