The design and development of efficient bifunctional electrocatalysts for fuel cells and rechargeable metal-air batteries have become increasingly urgent. This study systematically investigated the OER/ORR catalytic activities of NiN4, NiN3, NiN3H2, NiN4X, NiN3X, and NiN3H2X (X denotes axial ligand) through density functional theory (DFT) calulations. This study unveils two distinct reaction pathways for ORR and OER, involving proton-electron pairs adsorbed from both the solution and the catalyst surface. When proton-electron pairs are adsorbed from the solution. The introduction of N defects, two hydrogen atoms, and axial ligands, can significantly reduce the ORR overpotential. Specifically, NiN3, NiN3H2, NiN3X, and NiN3H2X (X = CN, NO2, and NH2) exhibited superior ORR activity compared to Pt. Meanwhile, the introduction of N-defects (NiN3) and two H atoms (NiN3H2) significantly improves their OER overpotential. To sum up, NiN3 and NiN3H2 show promise as pH-universal bifunctional electrocatalysts for both ORR and OER. On the other hand, when proton-electron pairs are adsorbed from the catalyst surface, the reaction energy barrier becomes the crucial metric for assessing catalytic activity. Our investigation reveals that NiN3H2 consistently exhibits optimal ORR activity across a wide pH range, regardless of the source of proton-electron pair (solvent or catalyst surface).