In this research, we first prepared poly (naphthylamine-formaldehyde) (PNAF) and then investigated its corrosion inhibition properties for polished steel specimens in 1 M HCl solution using chemical and electrochemical methods. Results showed that the PNAF could serve as an effective inhibitor of the corrosion of steel in hydrochloric acid media (the inhibition efficiency of this polymer at an optimum concentration of 100 mg L–1 was 99.9 %). The effect of temperatures on the corrosion behavior of steel was studied in the temperature ranging from 303 to 333 K for 1 M HCl at an optimum concentration of PNAF. It has been demonstrated that the adsorption behavior of this polymer on steel in 1 M HCl was found to obey Langmuir adsorption isotherm. Also, potentiodynamic polarization measurements showed that PNAF was a mixed type inhibitor.