 A polymerizable ionic liquid is explored as the precursor to produce nitrogen-doped carbon powders. The ionic liquid is functionalized with NO3− anions, which decompose and release gases during the pyrolysis process, facilitating the formation of a carbon foam. Scanning electron microscopy and transmission electron microscopy analyses show that the carbon foam is composed of curved carbon nanosheets with the maximum thickness of 70 nm. The favorable compositional (nitrogen doping to provide catalytically active sites) and morphological (curved nanosheet architecture to increase the contact area between electrolytes and catalytically active sites) characteristics make the present carbon powders a potential metal-free electrocatalyst for oxygen reduction and oxygen evolution reactions. As expected, the nitrogen-doped and curved carbon nanosheets exhibit a considerable activity towards the oxygen reduction reaction as well as a moderate ability for catalyzing the oxygen evolution reaction in KOH solutions.