An easy, one-step carbonization of alkali-treated wheat flour is proposed for the synthesis of three-dimensionally (3D) interconnected honeycomb-like porous carbon foam (HPC). Due to its interconnected porous structure with narrow pore size distribution, high specific surface area (1313m2 g−1), and heteroatom doping (N: 1.1at%, O:11.2at%), the HPC electrode exhibits a high specific capacitance of 473Fg−1 at 0.5Ag−1 in 6M KOH and outstanding electrochemical stability with capacitance retention up to 94.5% after 10,000 cycles. More interestingly, the assembled HPC//HPC symmetric supercapacitor delivers an ultrahigh energy density of 29.3Whkg−1 (based on the total mass of the active materials of the two electrodes), much higher than most of carbon-based supercapacitors. Additionally, the HPC//MnO2/HPC asymmetric supercapacitor exhibits a high energy density of 63.5Whkg−1 (based on the total mass of the active materials of the two electrodes) and excellent cycle stability (93.4% of initial capacitance retention after 5000 cycles).