Biomass is regarded as sustainable and low-cost precursors of porous carbons for electrochemical energy storage and conversion due to their varied architecture and plentiful heteroatom containing. We herein developed a hierarchical N-doped porous carbon nanosheet material from soybean milk by employing simultaneous hard-template and KOH activation strategy. Hard-template of CaCO3 nanospheres, KOH activation and the melt template of potassium species respectively result in the formation of macropores, micropores and nanosheet-like morphology. Moreover, abundant nitrogen and oxygen elements in precursor bring a high heteroatom percentage in resultants, which don’t contribute psuedocapacitance but also promote electron transfer and conductivity. The obtained carbons exhibit good charge storage capacity with a specific capacitance of 240.7 F g−1 (1 A g−1) and the excellent retention of initial specific capacitance (92.2% to 20 A g−1) that is much higher than those of biomass-based porous carbons. A symmetric all-solid-state supercapacitor using KOH/PVA as electrolyte has a specific capacitance of 149.3 F g−1 (0.5 A g−1), and good cycling stability with capacitance retention of 89.3% after 5000 cycles. The device displays energy density of 10.2 Wh kg−1 at a power density of 351 W kg−1, and retains 8.2 Wh kg−1 even at a high power density of 19,600 W kg−1 with a wide voltage window of 1.4 V.