Abstract H 2 O 2 production by electroreduction of O 2 is an attractive alternative to the current anthraquinone process, which is highly desirable for chemical industries and environmental remediation. However, it remains a great challenge to develop cost‐effective electrocatalysts for H 2 O 2 synthesis. Here, hierarchically porous carbon (HPC) was proposed for the electrosynthesis of H 2 O 2 from O 2 reduction. It exhibited high activity for O 2 reduction and good H 2 O 2 selectivity (95.0–70.2 %, most of them >90.0 % at pH 1–4 and >80.0 % at pH 7). High‐yield H 2 O 2 generation has been achieved on HPC with H 2 O 2 concentrations of 222.6–62.0 mmol L −1 (2.5 h) and corresponding H 2 O 2 production rates of 395.7–110.2 mmol h −1 g −1 at pH 1–7 and −0.5 V. Moreover, HPC was energy‐efficient for H 2 O 2 production with current efficiency of 81.8–70.8 %. The exceptional performance of HPC for electrosynthesis of H 2 O 2 could be attributed to its high content of sp 3 ‐C and defects, large surface area and fast mass transfer.