To understand the effect of nitrogen doping in hard carbon as anode for sodium ion battery, experimental and theoretical study have been done. To also see the size effect along with nitrogen doping, four varieties of carbon spheres are synthesized of two different size ranges viz. micron and nano-sized. Two of these spheres are nitrogen-doped, while the other two are un-doped. Nitrogen doping enhances the electrochemical performance of carbon spheres and increases the active storage sites by enhancing the number of defects and porosity. It further improves electrochemical performance by increasing electrical conductivity and controlling volume expansion. The density functional theory (DFT) study shows significant reduction in expansion associated with sodiation, i.e., from 21.7% to 7.9% because of nitrogen doping. After nitrogen doping, micron and nano-sized carbon spheres show an increase in capacity by 38.6% and 39.5%, respectively. Among these four electrodes, nitrogen-doped nano carbon spheres (NNCS) give the best performance. NNCS shows first reversible capacity of 286 mAh g−1, retains 85% of the capacity till 200 cycles at a current density of 30 mAg−1. This increase in electrical conductivity, defects, porosity, and reduction in volume expansion in nitrogen-doped carbon samples makes them an excellent material for sodium ion batteries.