Low-cost Na-ion batteries (SIBs) are a promising alternative to Li-ion batteries (LIBs) for large-scale energy storage systems due to the abundant sodium resources and eco-friendliness. The volumetric changes of sodium anodes during the sodiation/desodiation processes, however, reduce the cycling life of Na-ion batteries. In order to solve the problem, we have used the electrospinning method to successfully fabricate mesoporous S/N-doped carbon nanofibers (S/N-C), which show a high capacity and high-rate capability in a Na-ion battery. The S/N-C nanofibers delivered a high reversible capacity of 552.5 and 355.3 mA h g -1 at 0.1 and 5 A g -1 , respectively, because of the high S-doping (27.95%) in the carbon nanofibers. The introduction of N and S in S/N-C nanofibers increases the active sites for Na + storage and reduces the energy required for Na + transfer, as confirmed by in situ Raman spectroscopy and density functional theory (DFT) calculations. Moreover, the mesoporous S/N nanofibers are wetted by liquid electrolyte, which facilitates the Na + transport and increases the rate performance, thus making them a suitable anode material for SIBs and other electrochemical energy storage devices.