Abstract The development of cost effective, high performance, electrode materials for sodium ion batteries is of critical importance for large scale energy storage. Herein, we synthesize a novel nitrogen and fluorine co-doped porous carbon using a facile one-pot pyrolysis of three low cost components: polytetrafluoroethylene, a nitrogen-containing resin, and potassium hydroxide. The co-doped carbon comprises 3D assemblies of highly porous sheets with defects/disorders (and wide interlayer spacing of ~0.42 nm), which have a large surface area of 2040.3 m2 g−1 with hierarchical pore sizes. The advantageous combination of these structural features facilitates high sodium ion storage capacity, fast transfer kinetics and stable cycling. As a result, the co-doped carbon delivers an impressive 312.6 mAh g−1 at 0.1 A g−1 after 300 cycles and 215.3 mAh g−1 at 5 A g−1 after 5000 cycles (or 0.005% loss per cycle). Therefore, the excellent cycling performance of the carbon in combination with its convenient and low cost synthesis offers a promising sodium ion battery anode material for large scale energy storage.