A one-step electrochemical approach for the production of tunable nitrogen-doped graphene has been developed in this work. The simultaneous production and nitrogen incorporation of graphene are realized by electrochemical exfoliation of graphite in an aqueous electrolyte containing (NH4)2SO4 and NH3·H2O, which serve as an exfoliating agent and a nitrogen source, respectively. Both nitrogen contents and nitrogen bonding configurations can be manipulated by tuning the exfoliation conditions. The mechanism of nitrogen doping is proposed, based on analysis of the released gas from the graphite electrode, partially exfoliated graphite and graphene obtained. This green, efficient, low cost and scalable method provides a possible way for the large scale production of high-quality nitrogen-doped graphene. The nitrogen-doped graphene obtained is evaluated as a catalyst for the oxygen reduction reaction. It is demonstrated to be among the best nitrogen-doped graphene-based catalysts for the oxygen reduction reaction, even though the preparation process is extremely facile. Significantly, an Al–air battery is assembled, for the first time, by utilizing nitrogen-doped graphene as the cathode catalyst in this work. It can deliver a high specific capacity of 619 mA h gAl−1, corresponding to a specific energy of 817 W h kgAl−1, which is on a par with or better than that of Al–air batteries based on metal catalysts.