Based on aptamer recognition and target-mediated competitive hybridization of hairpin probes, we developed a fluorescence sensor for kanamycin (KAN) detection. The aptamer and KAN binding will open hairpin H1 to release the trigger DNA fragment, which can initiate the competitive hybridization between hairpins H2 and H3. Then, exonuclease III (Exo III) can cleave H2 and H3 to produce numerous DNA3 and DNA4. Through the synergetic hybridization among DNA1, DNA2, DNA3, and DNA4, an active Mg2+-DNAzyme can be formed. The cleavage reaction toward F...