A novel N-doped MOF-based hierarchical carbon fiber (NPCF) towards supercapacitors was prepared by the pyrolysis of MOF nanofibers. Due to its unique 1D hollow structures, the NPCF exhibits better energy storage capacity than the other previously reported MOF-derived carbon materials.