Aqueous Zn-ion hybrid supercapacitors (ZHSCs) hold great potential as next-generation energy storage devices due to their low cost, excellent rate capability, long cycling life, and high safety. Heteroatom-doped hierarchical porous carbons (HD-HPCs) with integrated high specific surface area, multiscale pores, and abundant defects have been regarded as promising cathode materials for ZHSCs. However, the in situ architecture of HD-HPCs with these multiple advantages via a sustainable and controllable method remains an arduous challenge. Herein, a novel molecular engineering strategy was proposed for the in situ construction of N/P/O-doped HD-HPCs via the direct carbonization of multiple-heteroatom-rich hypermolecules. Such a strategy has multiple advantages, including the exclusion of pore-making techniques, activation agents, templates, and complicated and hazard washing processes, demonstrating its green and sustainable properties. The highly active multiple-heteroatom-rich hypermolecular precursors contributed to the formation of abundant micro/mesopores due to the self-abscission of heteroatoms and heteroatom-contiguous carbon atoms at high carbonization temperatures. Consequently, these active structural/compositional features endowed the optimal cathodes with outstanding storage capacities of 139.2 and 88.9 mA h g −1 at 0.5 and 20 A g −1 for aqueous ZHSCs, respectively. They also delivered a superior storage performance in quasi-solid ZHSCs (QS-ZHSCs) with a high specific capacity of 111.5 mA h g −1 at 0.5 A g −1 . Superior energy/power densities and long cycling stability were also achieved for aqueous and QS-ZHSCs. The theoretical calculation confirmed the synergetic effects of multiple-atom doping on enhancing the electronic conductivity and reducing the energy barrier between Zn ions and carbon, which promote the Zn-ion adsorption capability. These findings shed fresh light on the straightforward manufacture of superior HD-HPCs for electrochemical energy storage.