AbstractEnergy storage in supercapacitors and hybrid zinc ion capacitors (ZIC) using porous carbon materials offers a promising alternative method for clean energy solutions. The unique combination of hierarchical porous structure and nitrogen doping in these materials has demonstrated significant capacity for energy storage. Nevertheless, the full potential of these materials, particularly the relationship between pore structure configuration and performance, remains underexplored. Herein, a confined pyrolysis strategy based on the polymerization characteristics of polydopamine (PDA) was developed to construction of hollow carbon spheres with microporous/mesoporous dual shell structure. The depth of micropores and cavity can be controlled by adjusting the duration of heat treatment and hydrothermal treatment, in accordance with the decomposition and polymerization characteristics of PDA. Due to the elasticity of this structure, the relationship between the micro/mesoporous depth of the prepared carbon spheres and the energy storage performance in supercapacitors and ZIC is established. Through optimizing the ion transport capacity of carbon spheres and considering the influence of its internal cavity structure on energy storage, the resulting carbon spheres exhibit high specific capacitance of 389 F g−1 in supercapacitor and specific capacitance of 260 F g−1 and excellent stability with 99.3 % retention after 30000 chare/discharge cycles in ZIC.