We described an aptamer based and Mg2+ mediated free zone capillary electrophoresis-laser induced fluorescence (CE-LIF) assay for aflatoxin B1 (AFB1) detection. This CE-LIF assay applied an anti-AFB1 aptamer with a single fluorescein (FAM) label at 5′ end and a short complementary DNA (cDNA). In the absence of AFB1, the cDNA hybridized with the aptamer probe and formed a duplex DNA. The use of running buffer containing MgCl 2 allowed good isolation of the duplex DNA from the single stranded DNA in CE. We found introducing a biotin label on the cDNA further improved the isolation. When AFB1 existed in sample solution, the aptamer probe bound with AFB1, dissociating from the duplex DNA. Thus, the duplex DNA peak decreased, while the aptamer probe peak increased during CE-LIF analysis. We achieved detection of AFB1 by measuring the aptamer probe peak. The length of cDNA, the ratio of aptamer to cDNA, and the concentration of MgCl 2 in sample buffer and separation buffer had great effect on the aptamer based CE-LIF assay. Under optimized conditions, the detection limit of AFB1 was 0.2 nM, and the dynamic range was from 0.2 nM to 500 nM. Limit of quantitation was 0.5 nM. This CE-LIF assay enabled detection of AFB1 spiked in diluted human serum, diluted human urine, and corn flour samples. This assay exhibits potential for wide application as it integrates the rapidity, high sensitivity, low sample consumption of CE-LIF analysis and the strengths of aptamer. An aptamer free zone capillary electrophoresis coupled with laser induced fluorescence assay (CE-LIF) was developed for detection of aflatoxin B1 (AFB1). AFB1 competes with a short complementary DNA (cDNA) in the binding to a fluorescein (FAM)-labeled aptamer probe. The duplex DNA is well isolated from the FAM-labeled aptamer in CE with separation buffer containing MgCl 2. The presence of AFB1 caused decrease of the aptamer-cDNA duplex peak and increase of aptamer probe peak during CE-LIF analysis. Image 1 • Aptamer free zone capillary electrophoresis (CE) assay for aflatoxin B1 (AFB1). • Complementary DNA (cDNA) and fluorescein-labeled aptamer probe are used. • MgCl 2 mediated CE allows separation of aptamer probe and aptamer-cDNA duplex. • AFB1 binding causes decrease of duplex peak and increase of aptamer probe peak. • AFB1 is detected by peaks changes in CE coupled with laser induced fluorescence. [ABSTRACT FROM AUTHOR]