Without the addition of inorganic acids, 2,5-Diaminobenzenesulfonic acid (DABSA) molecules form an acid environment, and are then electrochemically copolymerized with AN monomers to generate a self-doped polyaniline (SPAN) film on mild steel substrates. These SPAN deposition films are employed to test the protection efficiency for mild steel in a corrosion environment of HCl and NaCl, respectively. Electrochemical impedance spectroscopy (EIS) and polarization were used to determine the charge transfer resistance (R ct ) and corrosion current (I corr ), respectively. The above two parameters R ct and I corr are combined to evaluate the protection efficiency of SPAN film on mild steel. Experimental results show that the SPAN thin film with the AN/DABSA ratio of 8.8 has the optimal corrosion resistance in 1 M HCl and 1 M NaCl aqueous solutions, respectively.