The invention discloses a preparation method of an aptamer sensor for detecting antibiotic residue, belonging to the technical field of safety test of agricultural products. The method comprises the steps of carrying out electrochemical polymerization on a gold electrode and thionine to obtain electrically polymerized thionine electrode; after that, evenly dripping the prepared carbon nano tube-graphene nano-composition onto the surface of the electrically polymerized thionine electrode; drying in the air, and then soaking the electrode into antibiotic aptamer solution; washing, drying in the air, and closing by bull serum albumin (BSA) solution to obtain the antibiotic aptamer sensor. The prepared aptamer sensor has the advantages of not needing pretreatment, being high in analysis speed, simple in an operation system, high in accuracy, high in specificity, low in cost, rapid in response and the like, and has the limit of detection reaching up to 0.8nm, thus being suitable for rapidly detecting the antibiotic residue.