Chemical modification improves the performance of the carbon anode in sodium-ion batteries (SIBs). In this work, porous nitrogen-doped carbon (PNC) was obtained by removing template nanoparticles from the thermal decomposition products of calcium glutarate and acetonitrile vapor. The treatment of PNC with a KOH melt led to the etching of the carbon shells at the nitrogen sites, which caused the replacement of some nitrogen species by hydroxyl groups and the opening of pores. The attached hydroxyl groups interacted with Br2 molecules, resulting in a higher bromine content in the brominated pre-activated sample (5 at%) than in the brominated PNC (3 at%). Tests of the obtained materials in SIBs showed that KOH activation has little effect on the specific capacity of PNC, while bromination significantly improves the performance. The largest gain was achieved for brominated KOH-activated PNC, which was able to deliver 234 and 151 mAh g−1 at 0.05 and 1 A g−1, respectively, and demonstrated stable long-term operation at 0.25 and 0.5 A g−1. The improvement was related to the separation of graphitic layers due to Br2 intercalation and polarization of the carbon surface by covalently attached functional groups. Our results suggest a new two-stage modification strategy to improve the storage and high-rate capability of carbon materials in SIBs.