Carbonaceous materials have been regarded as promising materials for sodium-ion batteries (SIBs), owing to their high electrical conductivity and stable chemical properties. High-performance sodium-ion batteries need high quality carbon materials as anodes with low cost. Herein, we report a facile method of preparing N/P co-doped soft carbon nanoboxes (NPSC) using petroleum pitch as raw material. Benefitting from the nanobox-like morphology, expanded graphitic layer spacing and excellent electrical conductivity, the NPSC anodes show fast sodium-ion diffusion and high pseudo capacitance ratio, as a result, excellent rate capability and cycling performance can be achieved. The NPSC can deliver a high reversible capacity of 162 mAh g−1 over 3000 cycles at high current density of 1 A g−1. DFT calculations reveal that N, P co-doping carbon has more electrons near fermi level, thus facilitating electron transport. This work puts forward a convenient method to prepare carbon based anode for high performance SIBs with low cost petroleum pitch.