Nitrogen-doped hierarchical porous carbon (NHPC) was prepared by a combination of self-assembly and chemical activation and explored as an electrode materials for supercapacitors. Pore structure analysis showed that the pristine mesopores were basically preserved during activation, while the micropores were generated within the mesopore wall in large quantities. Cyclic voltammetry and galvanostatic charge/discharge measurements showed that the as-prepared NHPC exhibited a high specific capacitance of up to 257.8Fg−1, excellent rate capability and good cycling durability in 6M KOH electrolyte. The enhanced capacitive performance of NHPC can be attributed to the following three points: (1) the generated micropores play a most important role in the formation of electric double layer capacitance; (2) the hierarchical porous structure favors the fast diffusion of the electrolyte; (3) the nitrogen-containing functionalities generate extra pseudocapacitance and improve the wettability of the materials to the KOH electrolyte.