The hierarchically porous carbons derived from corn straw with a certain graphitization degree are synthesized through a simple two-step method involving hydrothermal carbonization and KOH activation. The pore structure and electrochemical performance of the hierarchically porous carbons are closely related to the mass ratio of hydrothermal carbon vs. KOH. Hierarchically porous carbon-1 (mass ratio of hydrothermal carbon vs. KOH is 1:1) presents an optimal specific capacitance of 285 F g−1 at a current density of 0.5 A g−1 and an excellent cycling stability with a high capacitance retention of 91.3% after 2000 charge/discharge cycles. These qualities are superior to those of other bio-based carbon materials because hierarchically porous carbon-1 exhibits a rich pore structure and a large specific surface area (1229 m2 g−1). Moreover, symmetric supercapacitor studies show the good capacitance and excellent stability and rate capability of hierarchically porous carbon-1. The results indicate that a proper activation ratio contributes to a satisfactory electrochemical performance and that corn straw-derived hierarchically porous carbons are promising candidates as electrode materials for supercapacitors.