Hard carbon is currently believed to be the most promising anode material for commercial sodium-ion batteries. However, the sodium-ion storage mechanism of hard carbons remains ambiguous due to the unclear relationship between their microstructures and sodium-ion storage performance. This work reports several hard carbons with different pore structures by the carbonization of different lignin precursors, and further studies the relationship between their microstructures and sodium-ion storage performance. Corn cob lignin, pine lignin, and acetylated pine lignin with different molecular structures were selected as the precursors for the preparation of hard carbons. It is found that hard carbon prepared by corn cob lignin has the highest closed pore volume, resulting in the highest plateau capacity. The formation of closed pores is due to the formation of micropores at low pyrolysis temperatures. The micropores then transform into closed pores at high carbonization temperatures. N2 adsorption/desorption, CO2 adsorption/desorption, and small-angle X-ray scattering are used to analyze the pore architectures of the obtained hard carbons, and a method for calculating the closed pore volume is proposed. It is found that the plateau capacity is positively correlated with the closed pore volume.