A green, resource-abundant, economical, and reversible anode is essential in the large-scale energy storage application of sodium-ion batteries (SIBs). In this study, sulfur and nitrogen co-doped hierarchically porous carbon materials (SN–HPCS) have been synthesized using high-yield biomass starch as a precursor through a simple and repeatable structural design method. The SN–HPCS has a unique sponge-like porous morphology with a three-dimensional (3D) interconnected reticular structure, which creates space for the electrolyte penetration into the carbon network and facilitates charge transfer. Meawhile, heteroatom-doping not only expands the interlayer distances of carbon but also introducts defect into carbon, which provide more active sites for the storage of Na+. As an anode for SIBs, SN–HPCS exhibits a high capacity 313 mAh g−1 at 0.8 A g−1, a good rate performance 268 mAh g−1 at 2 A g−1, and outstanding cycling stability 156 mAh g−1 after 3000 cycles at a current density of 8 A g−1, while maintaining 93% of their initial capacity. The enhanced Na+ storage performance is attributed to the synergistic effect of the structure advantages and dual-doping of nitrogen and sulfur.