Hard carbon is one of most promising anode materials used in sodium-ion batteries (SIBs) because of its high low-voltage plateau capacity. Heteroatom doping into the carbon structure is considered an effective method to enhance the Na+-ion uptake. However, heteroatom doping is not utilized to increase the low-voltage plateau capacity because the carbonization temperatures are limited to low values (600–1100 °C). In addition, the formation of excess defect sites, which is caused by heteroatom doping leads to lower initial Coulombic efficiency (ICE). Herein, to increase the low-voltage plateau capacity and to maintain high ICE, combination of high-temperature carbonization and low-level heteroatom doping is investigated. The P-doped hard carbon synthesized at 1300 °C with doping level of 1.1 at.% exhibits enhanced reversible capacity of 328 mAh g−1 at 50 mA g−1, and high ICE of 72% in SIBs. After the P-doping, the low-voltage plateau capacity increases, while the high-voltage sloping capacity does not change significantly. This is attributed to the enlargement of the interlayer spacing between the graphitic layers, which enhances Na+-ion intercalation. The P-doped hard carbon delivers a high reversible capacity of 302 mAh g−1 in potassium-ion batteries (KIBs); this value is 23% larger than that of undoped hard carbon.