Modulation of pore structure and heteroatom doping are very important strategies to improve the electrochemical properties of carbon electrode materials. This report investigates the use of biomass-derived nitrogen-doped porous carbon materials to address the challenge of the specific capacitance and energy density in supercapacitors. Nitrogen-doped three-dimensional hierarchical porous carbon materials were prepared using a polyacrylonitrile/sodium lignosulfonate composite monolith as a precursor by thermally induced phase separation and subsequent carbonization/activation. This method precisely controls the structure and surface properties of porous carbon materials by regulating the structure of the precursor and situ doping of nitrogen, which is a valuable strategy for the controllable regulation of the pore structure for nitrogen-doped porous carbon materials. The resulting carbon material displayed excellent capacitance performance, exhibiting a high specific capacitance of 325.7F g -1 at a current density of 0.5 A/g, maintaining initial capacitance retention of 90.1 % at a current density of 5 A/g after 10,000 cycles. When investigated for practical applications, the assembled supercapacitor device had a higher energy density (9.88 W h kg- 1), which is higher than commercial carbon-based supercapacitors.