Graphitic carbon nitride can be made by polymerization of cyanamide, dicyandiamide or melamine. The firstly formed polymeric CN structure, melon, with pendant amino groups, is a highly ordered polymer. Further reaction leads to more condensed and less defective CN species, based on tri-s-triazine (CN) units as elementary building blocks.
Graphitic carbon nitride can also be prepared by electrodeposition on Si(100) substrate from a saturated acetone solution of cyanuric trichloride and melamine (ratio =1: 1.5) at room temperature.
Well-crystallized graphitic carbon nitride nanocrystallites can also be prepared via benzene-thermal reaction between CNCl and NaNH at 180–220 °C for 8–12 h.
Recently, a new method of syntheses of graphitic carbon nitrides by heating at 400-600 °C of a mixture of melamine and uric acid in the presence of alumina has been reported. Alumina favored the deposition of the graphitic carbon nitrides layers on the exposed surface. This method can be assimilated to an in situ chemical vapor deposition (CVD).