Abstract The electrochemical performance of supercapacitors can be effectively improved through heteroatom doping and increasing specific surface area (SSA). Herein, a hydrothermal method is employed to synthesize glucose-urea resin precursor and resin derived 2D carbon nanosheets followed by pyrolysis activation process. Heteroatoms-doped microporous 2D carbon nanosheets (H-PCNs) with high SSA of 1429.61 m2 g−1 have been achieved owing to the introduction of sodium dodecyl benzene sulfonate (SDBS). The unique large area 2D carbon nanosheets with ultramicropores bring fast and accessible ion channels and provide ideal specific capacitance during charge-discharge process. The N and O heteroatoms in the resin-derived 2D carbon nanosheets produce considerable pseudocapacitance and improve the wettability as supercapacitor electrodes. The as prepared H-PCNs exhibits high specific capacitance of 416 and 297 F g−1 at 1 A g−1 and 10 A g−1 in 2M H2SO4, respectively. Even at high current density of 50 A g−1, the H-PCNs can still retain specific capacitance of 199 F g−1. The assembled H-PCNs-based symmetric supercapacitor also displayed an energy density of 21.0 Wh kg−1 at 50 W kg−1, and about 90% capacitance retention after 10000 cycles at the current density of 10 A g−1. Furthermore, the H-PCNs show specific capacity up to 400 F g−1 at 1 A g−1 with 6 M KOH as electrolyte.