Inspired by supermolecular self-assembly strategy, the N, P co-doped reduced graphene oxide (NP-rGO) material is fabricated by heat treatment from the supermolecular system of GO/MP (melamine and phytic acid supramolecular polymer). Herein, MP acts as not only a “sacrifice template” to promote the formation of uniform three-dimensional (3D) porous structure but also a spacer to hinder the graphene sheets from aggregate, as well as a precursor of nitrogen and phosphorus for N, P co-doping. The characterization results indicate that the NP-rGO has 3D porous structure with loose-packed and crumpled transparent thin layer morphology. The electrochemical measurements reveal that compared with the undoped rGO, the NP-rGO exhibits enhanced capacitive properties, including high specific capacitance (416 F g–1) and outstanding rate capability. After 10 000 cycles 94.63% capacitance is maintained, indicating good cycle stability. The NP-rGO is further assembled into symmetric supercapacitors, and the energy density of the NP-rGO is 22.3 Wh kg–1 (at 500 W kg–1). The outstanding supercapacitive properties may be attributed to the pesudocapacitive effect of N, P co-doping in graphene nanosheets as well as exceptional 3D porous structure.