A resin-based hard carbon with rich closed pores is prepared by the in situ reconstruction of cavities formed after heteroatoms evaporated during a high-temperature carbonization process. Various characterization results confirm that rich defect sites and micropores and enlarged layer spacing in hard carbon promote Na + transport and facilitate high-performance Na + storage.