In this work, a facile "carbonization-activation" strategy is developed to synthesize N, P-codoped hierarchical porous carbon. Phosphoric acid is innovatively introduced during the hydrothermal process to achieve in-situ P doping as well as create abundant pores, and the employment of sodamide is of vital importance to simultaneously serve as activating agent and N-source to succeed a high-level N doping.Thus, the obtained samples exhibit a unique three-dimensional hierarchical structure with an ultra-high specific surface area(3646 m~2g) and ultra-high N-doping level(9.81 at.%). Computational analyses confirm that N, P co-doping and higher N content can enhance active sites and widen potential differences of carbon materials to improve their capacitance. The as-prepared carbon materials demonstrate superior electrochemical performances, such as an ultra-high capacitance of 586 Fgat 1 Ag, a superior rate capability of 409 Fgat 20 Ag, and excellent long-term stability of 97 % capacitance retention after10,000 cycles in 6 M KOH. Moreover, an assembled symmetric supercapacitor delivers a high energy density of 28.1 Wh kgat the power density of 450 W kgin 1 M NaSO, demonstrating a great potential for applications in supercapacitors.