In the current study, a sensitive electrochemical sensing strategy based on aptamer (APT) for detection of sulfadimidine (SM2) was developed. A bare gold electrode (AuE) was first modified with 2-aminoethanethiol (2-AET) through self-assembly, used as linker for the subsequent immobilization of multi-walled carbon nanotubes and gold nanoparticle composites (MWCNTs/AuNPs). Then, the thiolated APT was assembled onto the electrode via sulfur-gold affinity. When SM2existed, the APT combined with SM2and formed a complex structure. The specific binding of SM2and APT increased the impedance, leading to hard electron transfer between the electrode surface and the redox probe [Fe(CN)6]3-/4-and producing a significant reduction of the signal. The SM2concentration could be reflected by the current difference of the peak currents before and after target binding. Under optimized conditions, the linear dynamic range is from 0.1 to 50 ng mL-1, with a detection limit of 0.055 ng mL-1. The sensor exhibited desirable selectivity against other sulfonamides and performs successfully when analyzing SM2in pork samples. Graphical abstract A new electrochemical biosensor for ultrasensitive detection of sulfadimidine (SM2) by using a gold electrode modified with MWCNTs/AuNPs for signal amplification and aptamer (APT) for selectivity improvement.