Linear alkyl benzene sulfonic acid (L) and three of its ester derivatives (L1, L2, L3) were prepared, followed by quaternization of these esters (L1Q, L2Q, L3Q). The corrosion inhibition effect on carbon steel in 1M HCl was studied using weight loss and potentiodynamic polarization measurements. The adsorption of the inhibitors on carbon steel surface obeyed the Langmuir’s adsorption isotherm. The associated activation energy of corrosion and other thermodynamic parameters such as enthalpy (ΔH ∗ ), entropy (ΔS ∗ ) of activation, adsorption–desorption equilibrium constant (K ads ), standard free energy of adsorption (ΔG o ads ), heat (ΔH o ads ), and entropy of adsorption (ΔS o ads ) were calculated to elaborate the corrosion inhibition mechanism.