Oxygen evolution (OER) and oxygen reduction (ORR) reactions are the key electrocatalytic redox couple for advanced energy storage/conversion, including rechargeable metal-air batteries and regenerative fuel cells. Heteroatom doped carbon catalysts propose a promising candidate for such purposes along with the superior durability and cost-effectiveness. Unfortunately, exact identification of the catalytic site as well as the critical role of dopants is still controversial in the catalytic mechanism. Here we present bifunctional catalytic site of nitrogen pair-doped graphene nanoribbons for precisely switchable OER and ORR. Pyrazolated N-2-edges of graphene nanoribbon serve as switchable dual-functional active sites for OER/ORR with efficient activities and extraordinary durability. Theoretical calculation reveals genuine catalytic mechanism originating from the electrochemical potential-dependent molecular absorption and conversion at the atomic level dopant site. This judiciously controllable bifunctional electrocatalytic activity of dopant catalyst fundamentally addresses the interference between ORR and OER and attains highly stable rechargeable metal-air battery with long-term stability.