The influence of a Schiff base namely N,N′-(pyridine-2,6-diyl)bis(1-(4-methoxyphenyl) methanimine) (PM) on the corrosion of J55 and N80 steel in 3.5 wt.% NaCl solution saturated with CO2 was evaluated using weight loss, potentiodynamic polarization, electrochemical impedance spectroscopy (EIS), X-ray diffraction (XRD), contact angle, scanning electron microscopy (SEM), atomic force microscopy (AFM) and scanning electrochemical microscopy (SECM). Potentiodynamic polarization results suggested that the inhibitor acted as a mixed type inhibitor by reducing both anodic and cathodic reactions. The adsorption of PM on the J55 and N80 steel surface obeyed the Langmuir adsorption isotherm. XRD, contact angle, SEM, AFM and SECM studies revealed that the surface of the metal was quite unaffected after the addition of inhibitor. Quantum chemical calculations and molecular dynamic simulation support the experimental results well.