Two mercaptobenzimidazole derivatives, namely the 1H-benzimidazol-2-thioyl hexane (MBI-C-6) and the 1H-benzimidazol-2-thioyl dodecane (MBI-C-12) were synthesized. The corrosion inhibiting potential of both compounds was studied in HCl solution (1.0 M HCl) for carbon steel. The investigation was conducted using gravimetric, electrochemical, Density Functional Theory (DFT), and molecular dynamics (MD) assessment methods. The carbon steel surfaces with or without the MBI-C-6 and MBI-C-12 were also assessed employing a Scanning Electron Microscope (SEM). The findings showed a high inhibition efficiency for both MBI-C-6 and MBI-C-12 at low concentrations, reaching 90% and 95.7% for MBI-C6 and MBI-C-12 at 10(-3) mol/L, respectively. Impedance results showed that the polarization resistance was greatly increased, from an initial value for the CS (in blank) of 12 up to 241 Omega cm(2) for the inhibited solution (1.0 mol/L HCl with 10(-3) mol/L of MBI-C-12). Tested compounds inhibited CS corrosion through a physical-chemical adsorption mechanism that followed Langmuir adsorption isotherm model with a change in the free energy of adsorption from -35.97 to -38.63 kJ/mol. DFT calculations and MD simulations were used to check the effect of the molecular structure of MBI-C-6 and MBI-C-12 on their reactivity and, on the other hand, to explain their adsorption mode on themetal surface. By scanning electron microscopy (SEM), the adequate protection of carbon steel by the usage of MBI-C-6 and MBI-C-12 in 1.0 M HCl was confirmed. All the outcomes from experimental findings and theoretical calculations were in line. (C) 2021 Elsevier B.V. All rights reserved.