The direct coupling of dinitrogen (N 2 ) and oxygen (O 2 ) to produce value-added chemicals such as nitric acid (HNO 3 ) at room temperature is fascinating but quite challenging because of the inertness of N 2 molecules. Herein, an interesting reaction pathway is proposed for a direct conversion of N 2 and O 2 mediated by all-metal Y 3 + cations. This reaction pattern begins with the N≡N triple bond cleavage by Y 3 + to generate a dinitride cation Y 2 N 2 + , and the electrons that lead to N 2 activation in this process mainly originate from Y atoms. In the following consecutive reactions with two O 2 molecules, the electrons stored in the N atoms are gradually released to reduce O 2 through re-formation and re-fracture of the N-N bonds, with concomitant release of two NO molecules. Therefore, the reversible N-N bond switching acts as an efficient electron reservoir to drive the oxidation of the reduced N atoms, leading to the formation of NO molecules. This method of producing NO by direct coupling N 2 and O 2 molecules, which is the reversible N-N bond switching, may provide a new strategy for the direct synthesis of HNO 3 , etc.