In this work, an enzyme-free colorimetric aptasensor has been constructed for the sensitive detection of kanamycin in complex samples, which integrates the target-triggered catalytic hairpin assembly (CHA) amplification with the aggregation of DNA-gold nanoparticle probes (AuNPs-DNA). In the presence of kanamycin, the hairpin probes (H1, H2 and H3) are able to form branched Y-shaped DNA nanostructures that possess three single-strand DNA (ssDNA) tails, which induce the assembly of AuNPs-DNA, resulting in a concomitant color change from red to blue-purple. The colorimetric readout can be visualized by naked eye or measured by UV–vis spectroscopy. The proposed aptasensor shows high sensitivity and selectivity for kanamycin detection with a broad linear range from 20 pM to 5 nM, and the limit of detection (LOD) is calculated to be 10 pM. Moreover, the colorimetric aptasensor exhibits excellent acceptable applicability for detection of kanamycin in complex samples (milk, honey, serum and river water) with satisfactory recoveries of 96.0–106% and RSDs of 1.92–4.04%, and the results are in accord with those of the ELISA method, indicating that the proposed sensing strategy has great potential applications in the fields of food safety, environmental monitoring and drug analysis.