Heteroatom doping, which has long been considered as one of the most efficient approaches to significantly enhance the sodium storage ability of carbonaceous anodes, has drawn increasing attention. Compared with single doping, dual doping can introduce more defects and accelerate ionic diffusion. In addition, the synergistic effect between the dual doped atoms can significantly improve the electrochemical performances. Besides, exploring novel precursors with excellent properties, which can induce porous structure and rapid pathways for electrons/ions in the resultant carbonaceous anode, is still full of challenges. Herein, nitrogen and sulfur–co-doped urchin-like porous carbon (NSC) was fabricated through a combined strategy including carbonization and subsequent sulfidation, using covalent organic frameworks (COFs) as precursors. Because of the dual doping–endowed rich defects, high electronic conductivity, and favorable capacitive behavior, the resultant NSC exhibited excellent sodium storage performances, delivering superior sodium storage capacity (483.5 mAh g−1 at 0.1 A g−1 after 100 cycles) and excellent cycling stability up to 1,000 cycles (231.6 mAh g−1 at 1.0 A g−1). Importantly, such remarkable electrochemical performances of the resultant carbonaceous anode may shed light on the efficient conversion of COFs to functional materials.