Enrofloxacin (ENR), as a synthetic broad-spectrum antibiotic is widely utilized in veterinary medicine to treat animal diseases and promote livestock growth, it can inhibit bacterial DNA gyrase subunit A, thereby preventing bacterial DNA replication and exerting its antibacterial effect. However, excessive use of enrofloxacin poses significant risks to ecological balance and human health due to residual contamination. We have developed a novel ENR aptamer sensor based on the gold nanoparticles/aptamer (AuNPs-Apt) complexes, in which AuNPs were synthesized via the seed method and functionalized with aptamers. The optical properties, particle size, functional groups and morphology of the AuNPs-Apt probe were characterized by transmission electron microscope, Fourier transform infrared spectrometer and UV–vis spectrophotometer, respectively. The aptamer biosensor can specifically identify enrofloxacin, with a wide detection range (0.05–100 μg ml−1) and a good linear relationship (
R
2
=0.99) within the detection range. In addition, the biosensor also has the advantages of short detection time, low biological toxicity, good stability, and low detection cost. Therefore, it shows a great prospect for practical application in the field of detecting enrofloxacin residues.