Carbon spheres (CS) with submicron size have demonstrated great potential in both lithium-ion batteries (LIBs) and sodium-ion batteries (SIBs), in virtue of their tunable microstructure, facile dispersion in slurry, enabling densely packing along with enough interspace for effective electrolyte transportation. However, the synthesis of monodisperse CS with both uniform size and excellent energy storage performance at high charge/discharge rates is still very challenging. Herein, a surfactant-assisted hydrothermal growth strategy is proposed to produce monodisperse CS. Moreover, an ammonia treatment is adopted to boost up its capacity especially at high current densities. As-synthesized N-doped carbon spheres (NCS) exhibit excellent lithium/sodium ions storage ability which delivers reversible capacities of 580 mAh g−1 and 270 mAh g−1 for LIBs and SIBs respectively at a current density of 20 mA g−1. Moreover, NCS can retain 194 mAh g−1 at 4 A g−1 for LIBs and 90 mAh g−1 at 5 A g−1 for SIBs. The improving rate capacities of NCS can be attributed to the short diffusion lengths of Li+ and Na+ ions of uniform submicron structure, as well as large specific surface area (SSA), additional active sites and good conductivity provided by ammonia treatment.