An immunoreaction-based method was investigated for the detection of aflatoxin M1 (AFM1), which is the hydroxylated metabolite of aflatoxin B1 (AFB1). This mycotoxin may be found in milk and milk products obtained from livestock that have ingested contaminated feed. Quantitative analysis of AFM1 was carried out using indirect (competitive) immunoassay method, which can be used for low weight molecules. The real-time measurement was done with Optical Waveguide Lightmode Spectroscopy (OWLS) technique. After the optimization of the chemical and biochemical parameters (determination of the optimal concentration of the immobilized AFM1-protein conjugate, determination of the AFM1 antibody content of the samples, etc.) real samples were also examined. Three kinds of milk sample preparation methods (filtration, centrifugation, size exclusion centrifugation) and two dilution rates (100 and 200 fold) were compared. The presented competitive immunoassay method showed the best results when 100 fold diluted filtered or centrifuged milk samples were examined. The dynamic measuring ranges for AFM1 were 0.001–0.1 ng ml−1 and 0.0005–0.01 ng ml−1, respectively.