N, O-codoped hierarchical porous carbon (HDPC) is synthesized adopting pomelo peel as a biomass carbon source by ZnCl2 activation. The prepared HDPC possesses a high specific surface area of 1582 m2 g−1 and together with rich heteroatom of 5.2 wt% N and 5.5 wt% O. When used as electrode material of supercapacitor, it delivers a higher specific capacitance of 180 F g−1 at 0.5 A g−1, excellent rate capability with a capacitance retention of 75.6% at 10 A g−1, and fantastic cycle stability with nearly 100% Coulombic efficiency at 5 A g−1 for 5000 cycles in 6 M KOH.