Different kinds of dopants were selected to dope polyaniline by chemical oxidative polymerization in this paper. Major characteristic peaks and microstructure of the doped polyaniline were analyzed by Fourier transform infrared spectra (FTIR) and scanning electron microscope (SEM). Measurement of membrane potential indicated that polyaniline doped with protonic acid such as sulfosalicylic acid (SSA) and hydrochloric acid (HCl) had characteristic of anionic selectivity, and polyaniline doped with cationic surfactant hexadecyl trimethyl ammonium bromide (CTAB) had characteristic of cationic selectivity. Doped polyaniline was added to the epoxy resin to obtain different ions selective coatings, such as anionic coating, cationic coating and bipolar coating. Results of electrochemical test in 5% potassium chloride (KCl) solution (at 60 °C) showed that anti-corrosion performance of the bipolar coating is better than that of cationic coating, and performance of the cationic coating is better than that of anionic coating. And the coatings contained HCl-doped polyaniline had better protection performance than those of SSA-doped because of its micro appearance and distribution.