A sensitive nicotine sensor based on a molecularly imprinted electropolymer of o-aminophenol is proposed and its configuration and performance are studied in detail. On the condition of weak acidity, the sensitive layer was prepared by electropolymerization of o-aminophenol on a gold electrode in the presence of the template (nicotine). The sensor exhibits good selectivity and sensitivity to nicotine. The determination limit is 2.0×10?7 mol/L and a linear relationship between the current and concentration is found in the range of 4.0×10?7 ~ 3.3 ×10?5 mol/L. The sensor has also been applied to the analysis of nicotine in tobacco samples with recovery rates ranging from 99.0 % to 102 %.