In this study, we investigated the inhibition of the corrosion of stainless steel (SS) in acidic solution by N-vinylimidazole monomer (NVI) and poly-N-vinylimidazole (PNVI). First, we have synthesized a polymer sample of PNVI from the monomer NVI. A stainless steel electrode was coated with this polymer as a thin film by dipping method. Corrosion rates of SS electrodes coated with PNVI films of different thicknesses were determined and compared with the results of the bare electrode in acidic solution. Corrosion rates of the bare SS electrodes were also compared with the rates in the presence of monomer and polymer, respectively, in the acidic solution. The corrosion currents were obtained by Tafel extrapolation from anodic and cathodic polarization curves. Electrochemical impedance spectroscopy (EIS) measurements were also carried out. Values of percent inhibition, wetted area and porosity were obtained for SS electrodes coated with PNVI films of different thicknesses.