A novel cationic surfactant with good surface properties as a good inhibitor for carbon steel in HCl is shown, acting as a mixed-type inhibitor. Its adsorption obeys the Langmuir isotherm. By increasing the inhibitor concentration the inhibition efficiency increases.