Hollow nanostructures have shown great potential in energy storage and have attracted widespread attention. Here, we report a series of hollow carbon nanocage (HCN) by carbonizing [email protected] core–shell precursor at different temperatures. The study found that when the carbonization temperature is 800 °C, HCN-800 has a good hollow structure, thin shell and large specific surface area, and contains abundant micropores and mesopores. When used as an anode material, even at a current density of 10.0 A g−1, it can still obtain reversible capacities of 236.1 mA h g−1 (5000 cycles, lithium ion batteries LIBs) and 111.7 mA h g−1 (10000 cycles, sodium ion batteries SIBs), showing excellent cycle stability and long cycle lifespan. And this outstanding ability can still be maintained under high areal mass loading. In addition, the lithium/sodium storage behavior was analyzed by CV kinetic analysis, ex-situ XPS and Raman tests. Benefiting from these advantages, HCN-800 can be prepared with higher areal mass loading by 3D printing and exhibit excellent lithium/sodium storage performance, which will bring broad application prospects for the development of high energy density secondary batteries. Finally, by using LiCoO2/Na3V2(PO4)3 cathode and HCN-800 anode to assemble a full cell to study the cycle performance. After 100 cycles at 0.1 A g−1 current density, the reversible capacity of 561.5 mA h g−1 (LIBs) and 164.7 mA h g−1 (SIBs) can be provided respectively, indicates that it has the potential of practical application.