The specific energy of a supercapacitor (SC) with an ionic liquid (IL)-based electrolyte is larger than that using an aqueous electrolyte owing to the wide operating voltage window provided by the IL. However, the wide-scale application of high-energy SCs using ILs is limited owing to a serious reduction of the energy with increasing power. The introduction of macropores to the porous material can mitigate the reduction in the gravimetric capacitance at high rates, but this lowers the volumetric capacitance. Synthetic polymers can be used to obtain macroporous frameworks with high apparent densities, but the preservation of the frameworks during activation is challenging. To simultaneously achieve high gravimetric capacitance, volumetric capacitance, and rate capability, a systematic strategy was used to synthesize a densely knitted carbon framework with a hierarchical pore structure by using a polymer. The energy of the SC using the hierarchically porous carbon was 160 Wh kg−1 and 85 Wh L−1 on an active material base at a power of 100 W kg−1 in an IL electrolyte, and 60 % of the energy was still retained at a power larger than 5000 W kg−1. To illustrate, a full-packaged SC with the material could store/release energy comparable to a Ni–metal hydride battery (gravimetrically) and one order of magnitude higher than a commercial carbon-based SC (volumetrically), within one minute.