The corrosion behavior of mild steel (MS) in HCl solution containing various concentrations of electropolymerized P(p-phenylenediamine), P(pPD), has been investigated using weight loss and potentiodynamic polarization techniques. The data obtained from the two techniques are comparable and showed that the presence of P(pPD) in the acid solutions suppresses the corrosion rate of MS indicating that these polymers act as corrosion inhibitors (predominantly as anodic inhibitors). The inhibition efficiency (IE%) of the polymer enhances with increasing their concentrations and decrease with an increase in temperature. The inhibition occurs through adsorption and formation of barrier film on the metal surface which separates the metal from direct contact with the corrosive medium and hence protects the metal against the corrosion. The adsorption followed the Langmuir isotherm. The thermodynamic functions of the adsorption and dissolution processes were evaluated.