The illegal adulteration of milk with melamine in 2008 in China led to adverse kidney and urinary tract effects in hundreds of thousands of children and the reported deaths of six. The milk had been deliberately adulterated to elevate the apparent protein content, and subsequently melamine was detected in many milk-related products which had been exported. This led to the banning of imports of milk and milk products from China intended for the nutritional use of children and to the implementation of analytical methods to test products containing milk products. An optical biosensor inhibition immunoassay has been developed as a rapid and robust method for the analysis of infant formula and infant liquid milk samples. A compound with a chemical structure similar to that of melamine was employed as a hapten to raise a polyclonal antibody and as the immobilized antigen on the surface of a biosensor chip. The sensitivity of the assay, given as an IC(50), was calculated to be 67.9 ng mL(-1) in buffer. The antibody did not cross-react with any of the byproducts of melamine manufacture; however, significant cross-reactivity was observed with the insecticide cyromazine of which melamine is a metabolite. When sample matrix was applied to the assay, a limit of detection of <0.5 μg mL(-1) was determined in both infant formula and infant liquid milk. The development of the immunoassay and validation data for the detection of melamine is presented together with the results obtained following the analysis of melamine-contaminated milk powder.