Abstract Focusing on major issues of carbon materials like insufficient capacitance and limited energy supply in supercapacitors, we propose the strategy of developing advanced carbon and high-voltage inorganic gel electrolyte to efficiently solve these challenges. Firstly, the architecture of self-doped carbon nanofoam (A-CS650) is fabricated utilizing naturally rich cotton stalk through a facile procedure, which demonstrates exceptional performance contributed by synergistic features of large surface area, hierarchical porosity and rich defects. A-CS650 presents gravimetric and volumetric capacitances up to 282 F g−1 and 234 F cm−3 at 0.5 A g−1, and a high-rate capacitance retention of 72.7% at a large rate of 100 A g−1. With increasing the mass loading to 20 mg cm−2, A-CS650 still retains good performance. Especially, by using unique CMC-Na/Na2SO4 gel electrolyte, 1.8 V A-CS650//A-CS650 quasi-solid-state supercapacitor, for the first time, is constructed, which displays an outstanding energy density of 22.6 Wh kg−1, greatly exceeding the value in PVA/KOH electrolyte (7.3 Wh kg−1). Besides, this device exhibits considerable stability over 10000 cycles (81.6% capacitance retention). The insight from this work verifies great adaptability of biowaste-derived carbons toward supercapacitors, and may open a new technical platform to develop portable energy systems.