Background: The non-metallic carbon catalyst in oxygen reduction reaction (ORR) is mainly hindered by their low catalytic activity and high cost.Methods: Novel hierarchical porous carbons (HPCs) with N, S codoping were synthesized from WPCBs based on the crab shell templates accompanied by different KOH activation temperatures and the modification of IL. Significant findings: Owing to the ordered hierarchical porous structure, HPCs-850 have large SBET (2209 m2/g) and high Vtot (1.389 cm3/g). After IL modification, N and S elements are successfully introduced into the carbon network of HPCs-850 to synthesize LHPCs-850. In an alkaline medium, the reduction potential, initial voltage, half-wave potential, and limiting current density of LHPCs-850 are 0.68 V, 1.05 V, 0.78 V, and 4.9 mA/cm2, demonstrating LHPCs-850 have excellent ORR catalytic performance. After 18,000 s durable measurement, the relative current density of LHPCs-850 still keeps 92% of its initial current density, which is more stable than that of HPCs-850 (87%). DFT calculation confirms that N, S codoping can improve catalytic activity by providing additional ORR active sites number. The proposed route to prepare WPCBs-based LHPCs broadens a new field of large-scale synthesis of electrocatalytic materials from industrial wastes.