In this work a coco-modified imidazoline has been evaluated as a CO2 and H2S corrosion inhibitor for a 1018 carbon steel using a NaCl 3% solution. Testing techniques incluyes potentiodynamic polarization curves and electrochemical impedance spectroscopy. In absence of the inhibitor the steel was susceptible to uniform type of corrosion in presence of CO2 to blistering-type of corrosion when H2S was present and to blistering and pitting-type when both were added to the NaCl 3% solution. The greatest inhibitor efficiency was found for the CO2-saturated NaCl 3% solution but it decreased when both CO2 and H2S were present although some pitts were still found. For comparison the same tests were performed for the un-modified imidazoline and the corroded surfaces were characterized by using scaning electronic microscopy (SEM).