A method was developed for the simultaneous determination of melamine, ammeline, ammelide, and cyanuric acid in egg using gas chromatography-tandem mass spectrometry (GC-MS/MS). The samples were first extracted by the solution of diethylamine-water-acetonitrile (10:40:50, v/v/v). Clean-up employed an 'On Guard II' RP cartridge, and the dried elute was derivatised using bis-(trimethylsilyl)trifluoroacetamide (BSTFA) with 1% trimethylchlorosilane (TMCS). Derivatised samples were analysed by GC-MS/MS using multiple-reaction monitoring (MRM) with 13C3-15N3-labelled melamine and cyanuric acid as internal standards. Blank samples of egg were spiked with the four analytes at concentration level of 0.1, 0.5, 1.0 mg kg-1, and the intra-day and inter-day recoveries were in the range 75.7-122.5% with the relative standard deviation (RSD) from 2.6% to 22.8%. Decision limits (CC, = 0.01) for melamine, ammeline, ammelide, and cyanuric acid in egg samples and milk powder were 3.5-5.9 and 2.5 to 3.8 mu g kg-1, and the detection capabilities (CC, = 0.05) were 4.9-8.4 and 3.6-9.5 mu g kg-1, respectively. The method was successfully applied to egg samples and milk products as well. Satisfactory results were obtained as part of the 2009 European Union melamine proficiency test.