The sodium storage mechanism of hard carbon anodes still remains controversial. It is usually believed that there exists relationship between the plateau capacity and the closed pores of hard carbon. Herein, a sulfamethazine molecule is selected as a model precursor to prepare hard carbon. A molten state occurs during the carbonization process of this precursor, which reduces the formation of open pores. Hard carbon materials exhibiting diverse closed pore structures are synthesized by carbonizing at temperatures ranging from 1100 °C to 1700 °C. The closed pores and plateau capacity exhibit a linear correlation, which is based on their closed pore volume and sodium-ion storage capacities. The hard carbon material prepared at 1500 °C exhibits excellent electrochemical performance, which delivers a high reversible capacity of 292 mAh g−1 with a plateau capacity of 230 mAh g−1 at a current density of 0.05 A g−1, as well as decent cycling stability (83 % capacity retention at 0.1 A g−1 over 200 cycles). The model hard carbon confirms that the plateau capacity is attributed to the storage of sodium ions in the closed pores.