Porous carbon materials have been used extensively in new energy storage materials. They have the advantages of high stability, large specific surface area, and good electrical conductivity. However, carbon material capacitance still needs to be increased. In this paper, nitrogen and phosphorus-codoped porous carbon membrane (NPCM) was prepared by electrostatic spinning using polyacrylonitrile (PAN) as a carbon and nitrogen source, triphenylphosphine (TPP) as a phosphorus source and SBA-15 as a templating agent. When PAN/TPP was set to 2:1, the resulting NPCM has good flexibility, with N and P doping content of 13.8% and 0.5%, respectively, and a specific surface area of 872 m2/g. The NPCM was used as the working electrode with 1.0 M H2SO4 electrolyte and a specific capacitance of 215 F/g was achieved at a current density of 0.5 A/g by a three-electrode test, The capacitance retention rate could reach 103% after 1000 charge/discharge cycles at a current density of 2.0 A/g. Therefore, these results indicate that NPCM has great potential for application in high-performance flexible supercapacitors.