Nanoporous carbon is a highly promising material for energy storage and conversion due to its high specific surface area, large pore volume, and tunable porosity. Herein, we report carbon nitride (CN) incorporated nanoporous carbon derived from largely available and low-cost Victorian brown coal through the KOH solid-state activation followed by the carbonization of aminoguanidine at low temperatures under inert conditions. The prepared materials have high specific surface areas (>3100 m<sup>2</sup> g<sup>-1</sup>), large pore volumes (>1.7 cm<sup>3</sup> g<sup>-1</sup>), and a hierarchical nanoporous structure. At a current density of 0.5 A g<sup>−1</sup>, the optimized material exhibited a high specific capacitance of 226.5 F g<sup>-1</sup>. The symmetric supercapacitor device demonstrated an energy density of 18 Wh kg<sup>−1</sup> at a power density of 582 Wkg<sup>-1</sup>. Furthermore, a quasi-solid KOH/PVA gel-based supercapacitor exhibited a specific capacitance of 119.3 F g<sup>-1</sup> at 0.1 A g<sup>-1</sup>. The AG10 material also demonstrated an excellent limiting current density of 5.31 mA cm<sup>−2</sup> at 0.2 V in the oxygen reduction reaction, significantly higher than the nanoporous carbon without CN (0.94 mA cm<sup>−2</sup>). While the nanoporous carbon plays a key role in ion transfer and providing electrical conductivity, CN is beneficial for providing abundant electrochemical active sites for improving capacitive and catalytic performance. The work demonstrates the advantage of optimal incorporation of CN in imparting N functionalities while retaining high surface area and porosity for improved energy storage and oxygen reduction reaction performance.