The development of simple and green synthetic strategies to obtain porous carbon with both high energy density and power density for carbon-based supercapacitors has motivated the utilization of sustainable biomass materials, due to their unique microstructures and high heteroatom contents. Herein, a novel, green and efficient activation agent magnesium carbonate is proposed to prepare nitrogen self-doped hierarchical porous carbon materials derived from pine pollen for superior carbon-based supercapacitors. The obtained carbon has a large surface area of 1311.2 m2 g−1, hierarchical porous structure with interconnected meso-/macropores and high nitrogen, oxygen contents. When applied as supercapacitor electrode in a three-electrode system, the carbon-based electrode exhibits a high specific capacitance of 419.6 F g−1 at a current density of 1 A g−1, good rate retention of 60.3% from 1 to 100 A g−1 and superior long-term cycling stability with 2.6% loss of its initial capacitance after 10,000 cycles in 6 M KOH aqueous electrolyte. Additionally, the assembled symmetric supercapacitor can work at a high voltage of 2.0 V in 1 M Na2SO4 aqueous electrolyte, and deliver an ultrahigh energy density of 34.9 Wh kg−1 at a power density of 181.0 W kg−1.