Abstract Insoluble multi-walled carbon nanotube (MWCNT) was readily dispersed into water in the presence of dihexadecyl hydrogen phosphate, and then used to modify the surface of glassy carbon electrode (GCE) by means of solvent evaporation. Scanning electron microscopy test indicated that the GCE surface was coated with uniform MWCNT film. The resulting MWCNT film-modified GCE greatly enhanced the oxidation signal of ractopamine. The oxidation mechanism was studied, and it was found that the oxidation of ractopamine occurred at two phenolic hydroxyl groups, involving two protons and two electrons. Moreover, the influences of pH value, amount of MWCNT, accumulation potential and time were investigated on the oxidation signal of ractopamine. Based on the strong enhancement effect of MWCNT, a sensitive, rapid and simple electrochemical method was developed for the detection of ractopamine. The linear range was from 50μgL−1 to 2mgL−1, and the detection limit was 20μgL−1. Finally, this method was successfully used to detect the content of ractopamine in pork and liver samples, and the recovery was in the range from 93.1% to 107.2%.