The inhibition ability of the new derivative (quinolin-2-one), namely (1-{[5-(2-Chloro-phenylazo)-2- hydroy-benzylidene]-amino}-4,7-dimethyl -6-nitro- 1H-quinolin-2-one (CPHAQ2O)) towards carbon steel corrosion in (3.5% NaCl) and (0.5M HCl) solutions were evaluated by potentiodynamic polarization at different inhibitor concentrations. Polarization curves showed that the evaluated compound acted as mixed inhibitors, and the adsorption of the evaluated inhibitor obeys the Langmuir adsorption isotherm in both salt and acid solutions. The results revealed that the percentage inhibition efficiency (%IE) in the salty solution (90.55%) is greater than that in the acidic solution (77.62%). The surface changes of the carbon steel and the film persistency of the inhibitor were studied using SEM (Scanning Electron Microscopy).