A novel idea has been developed to realize the formation of heteroatoms doped carbon materials by exploiting a precursor of a single compound, polyphosphazene, for supercapacitor applications. Heteroatoms (N, P, O) containing polymer, poly(diaryloxyphosphazene) (PDPP) was synthesized by the substitution reaction of linear polydichlorophosphazene (PDCP) with sodium phenolate. After carbonization of PDPP, a nanoporous carbon materials doped with N, P and O were obtained. The BET studies had shown that the surface area of this activated carbon material reached up to 1798 m2 g−1 with pore volume up to 0.91 cm3 g−1. When applied as supercapacitor electrodes, this heteroatoms doped carbon material exhibited a specific capacitance of 105 F g−1 at 0.3 A g−1 in a two-electrode cell (up to 329 F g−1 at 0.5 A g−1 in a three-electrode cell) and better rate performance with 55.2% of maintenance from 0.3 to 10 A g−1 in a two-electrode cell (63.8% of maintenance from 0.5 to 50 A g−1 in a three-electrode cell). Owing to the large surface area, adequate pore volume, stable cycling performance and good rate capabilities of our synthesized material, it has potential application as supercapacitor electrodes.