g -1 at 0.5 A g -1 , which is much higher than that of CSB (53 F g -1 at 0.5 A g -1 ) as shown in Fig. . Further, the ASCB electrode delivered the capacitance retention of about 90% after 3000 continuous charge-discharge cycles. In addition, the ASCB electrode was tested as the anode material for Na ion batteries, and showed good electrochemical performances, indicating their suitability for energy storage applications. The improved electrochemical performances of ASCB electrodes could be attributed to the hierarchically porous structure, and the dual-doping of sulfur, and nitrogen, which could allow sufficient infiltration of the electrolyte and shorten the transport pathway for both electrons, and ions. For the first time, Wan et al. reported the preparation of polybenzoxazine (PBZ) based nitrogen-containing porous carbon from 4-cyanophenol, melamine, and formaldehyde through a solution method . In this study, the nitrogen-containing porous carbons (NPCs) were synthesized from the nitrogen-rich (PBZ) by soft-templating method, and KOH activation process at different temperatures (600, 700, and 800 ˚C) under N2 atmosphere. The activated carbon samples were labelled as NPC-1, NPC-2, and NPC-3, accordingly. The SBET, and the total pore volume of the prepared materials were found to be increased with activation temperature (from 600 to 800 ˚C). The NPC-1, NPC-2, and NPC-3 showed the SBET of 1254.9 m 2 g -1 , 2036.3 m 2 g -1 , and 2267.3 m 2 g -1 , and the total pore volume of 0.57, 0.95, and 1.05 cm 3 g -1 , respectively. The N, and O heteroatoms were determined from the XPS analysis of synthesized materials, which were found to be decreased with increasing activation temperature. The N/O heteroatoms contents in NPC-1, NPC-2, and NPC-3 were estimated as 4. , respectively. The material NPC-2 activated at 700 ˚C resulted to highest gravimetric capacitance of 362.4 F g -1 a 1 A g -1 in 6 M KOH aqueous solution, high-rate capability, and good cyclic stability with a capacitance retention of 94.7% after 5000 cycles. The prepared material was also utilized as a solid adsorbed for CO2 capture, and delivered good results. The high performance of NPCs as supercapacitor electrode, and CO2 adsorbents were owing to the high SBET, optimal pore size distribution, and the rich surface nitrogen functionalities in the carbon matrix.