Carbon nanofibers (CNFs), possessing high electrical conductance and facilitating fast electron transfer due to 1D structure, attract more research interests in the field of energy storage/conversion. It is highly desirable to develop a simple synthetic approach to prepare high quality CNFs for high efficient electrode material. Herein, a facile method is developed to prepare nitrogen-doped porous CNFs with high aspect ratio by direct pyrolysis of phenolic-resin-based precursors which are synthesized via a simple hydrothermal approach. After activation by KOH, the nitrogen-doped porous CNFs demonstrate a high surface area up to 1814.1 m2/g thereby offering a high capacitance while working as the electrode material assembled in a supercapacitor. The activated CNFs as electrode material present a high specific capacitance of 333.5F g−1 at a current density of 0.5 A g−1 in a three-electrode cell. After 10,000 cycles of charge–discharge tests at 5A g−1, the decay in specific capacitance is only 3.7 %, indicating a high reversibility. Also, the tests in a two electrode system show a high energy density of 8.6 Wh kg−1 at a power density of 25 W kg−1. Therefore, the nitrogen-doped CNFs derived from its phenolic-resin-based precursor hold a promise for an efficient electrode material in supercapacitor.