An assay for the detection of oxytectracycline(OTC) from bovine milk samples based on aptamer conjugated gold nanoparticle and magnetic nanoparticle was optimised. The amine functionalized magnetic nanoparticles were designed to extract the OTC residue from the milk samples with electrochemical interactions. A specific OTC binding aptamer was conjugated with the gold nanoparticles for use as a detection probe. A calibration curve was plotted with standard stock solutions. The linear range obtained was 3.36×10−7 ~5.37 ×10−7(M), the detection limit was 305 ng/ml and the total assay time was 200 min. The OTC concentrations of 50 milk samples were determined by this method and the maximum percentage (%) of interference was less than 5.0 % and the recovery rate was more than 95.0%. This method has good potential for residue monitoring in milk samples.