Ni-based materials are promising candidates for electrocatalytic hydrogen oxidation reaction and hydrogen evolution reaction in alkaline solution. However, pure Ni binds hydrogen too strongly. To promote the electrocatalytic activity would require the weakening of its hydrogen binding energy. Here, we demonstrate that the interstitial nitrogen doping in Ni3N can greatly promote its electrocatalytic activity. Ni3N nanoparticles are prepared from the controlled nitridation of Ni-based coordination polymer nanosheets. The resultant product exhibits excellent mass activity superior to most existing non-precious-metal-based materials and great CO-tolerance for hydrogen oxidation reaction, as well as remarkable activity and stability for hydrogen evolution reaction. Our experimental results are further understood and supported by theoretical simulations showing that the interstitial nitrogen doping significantly decreases the hydrogen binding energy and lowers the activation barrier for water formation and dissociation.