Development of efficient, low-cost and stable electrocatalysts as the alternative to platinum for the oxygen reduction reaction is of significance for many important electrochemical devices, such as fuel cells, metal-air batteries and chlor-alkali electrolysers. Here we report a highly active nitrogen-doped, carbon-based, metal-free oxygen reduction reaction electrocatalyst, prepared by a hard-templating synthesis, for which nitrogen-enriched aromatic polymers and colloidal silica are used as precursor and template, respectively, followed by ammonia activation. Our protocol allows for the simultaneous optimization of both porous structures and surface functionalities of nitrogen-doped carbons. Accordingly, the prepared catalysts show the highest oxygen reduction reaction activity (half-wave potential of 0.85 V versus reversible hydrogen electrode with a low loading of 0.1 mg cm À 2 ) in alkaline media among all reported metal-free catalysts. Significantly, when used for constructing the air electrode of zinc-air battery, our metal-free catalyst outperforms the state-of the-art platinum-based catalyst.