The success of intermittent renewable energy systems relies on the development of energy storage technologies. Particularly, active and stable water splitting electrocatalysts operating in the same electrolyte are required to enhance the overall efficiency and reduce the costs. Here we report a precise and facile synthesis method to control nitrogen active sites for producing nitrogen doped multi-walled carbon nanotube (NMWNT) with high activity toward both oxygen and hydrogen evolution reactions (OER and HER). The NMWNT shows an extraordinary OER activity, superior to the most active non-metal based OER electrocatalysts. For OER, the NMWNT requires overpotentials of only 320 and 360 mV to deliver current densities of 10 and 50 mA cm−2 in 1.0 M NaOH, respectively. This metal-free electrocatalyst also exhibits a proper performance toward HER with a moderate overpotential of 340 mV to achieve a current density of 10 mA cm−2 in 0.1 M NaOH. This catalyst also shows high stability after long-time water oxidation without notable changes in the structure of the material. It is revealed that the electron-withdrawing pyridinic N moieties in the NMWNTs could serve as the active sites for OER and HER. Our findings open up new avenues for the development of metal-free electrocatalysts for full water splitting.