The polymeric carbon nitride referred to as melon has been extensively investigated to explore its potential use in visible-light-driven photocatalysis. To extend the application of melon to optoelectronic devices, we fabricated organic light-emitting diodes using melon or its monomer, 2,5,8-triamino-tri-s-triazine (melem), as the light-emitting layers. The sodium-doped melon- and melem-based devices were found to exhibit green-yellow and purple electroluminescence, respectively. These devices were fabricated using polymeric carbon nitride films directly synthesized on a substrate via thermal condensation. It is suggested that carbon nitride materials are useful not only for conventional applications (e.g., photocatalysts), but also for applications in organic electronics.