Melamine is an organic base and a trimer of cyanamide, with a 1,3,5-triazine skeleton. Like cyanamide, it contains 67% nitrogen by mass and, if mixed with resins, has fire retardant properties due to its release of nitrogen gas when burned or charred, and has several other industrial uses. Melamine is also a metabolite of cyromazine, a pesticide. It is formed in the body of mammals that have ingested cyromazine. It has been reported that cyromazine can also be converted to melamine in plants.

Melamine combines with acid and related compounds to form melamine cyanurate and related crystal structures, which have been implicated as contaminants or biomarkers in Chinese protein adulterations.

Melamine is combined with formaldehyde to produce melamine resin, a very durable thermosetting plastic used in high pressure decorative laminates such as Formica, melamine dinnerware, laminate flooring, and dry erase boards. Melamine foam is used as insulation, soundproofing material and in polymeric cleaning products, such as Magic Eraser. Melamine is one of the major components in Pigment Yellow 150, a colorant in inks and plastics.

Melamine also enters the fabrication of melamine poly-sulfonate used as superplasticizer for making high-resistance concrete. Sulfonated melamine formaldehyde (SMF) is a polymer used as cement admixture to reduce the water content in concrete while increasing the fluidity and the workability of the mix during its handling and pouring. It results in concrete with a lower porosity and a higher mechanical strength, exhibiting an improved resistance to aggressive environments and a longer lifetime.

Melamine is sometimes illegally added to food products to increase the apparent protein content. Standard tests, such as the Kjeldahl and Dumas tests, estimate protein levels by measuring the nitrogen content, so they can be misled by adding nitrogen-rich compounds such as melamine. An instrument (SPRINT) developed by the company CEM Corp allows the determination of protein content directly in some applications; the instrument cannot be fooled by adding melamine in the sample.