Rational design and simple synthesis of one-dimensional nanofibers with high specific surface areas and hierarchically porous structures are still challenging. In the present work, a novel strategy utilizing a thermally removable template was developed to synthesize hierarchically porous N-doped carbon nanofibers (HP-NCNFs) through the use of simple electrospinning technology coupled with subsequent pyrolysis. During the pyrolysis process, ZnO nanoparticles can be formed in situ and act as a thermally removable template due to their decomposition and sublimation under high-temperature conditions. The resulting HP-NCNFs have lengths of up to hundreds of micrometers with an average diameter of 300 nm and possess a hierarchically porous structure throughout. Such unique structures endow HP-NCNFs with a high specific surface area of up to 829.5 m2·g–1, which is 2.6 times higher than that (323.2 m2·g–1) of conventional N-doped carbon nanofibers (NCNFs). Compared with conventional NCNFs, the HP-NCNF catalyst exhibited greatly enhanced catalytic performance and improved kinetics for the oxygen reduction reaction (ORR) in alkaline media. Moreover, the HP-NCNFs even showed better stability and stronger methanol crossover effect tolerance than the commercial Pt-C catalyst. The optimized ORR performance can be attributed to the synergetic contribution of continuous and three-dimensional (3D) cross-linked structures, graphene-like structure on the edge of the HP-NCNFs, high specific surface area, and a hierarchically porous structure.