The corrosion inhibition of a new benzimidazole derivative, 6-(dodecyloxy)-1H-benzo[d]imidazole (DBI), for mild steel in 1M HCl was investigated in this paper. Computational chemistry was performed to explore the adsorption of DBI on metal surface. Inhibition performance of DBI is attributed to both the direct interaction of benzimidazole segment with iron surface and the barrier effect of the non-polar long chain against aggressive solution. Compared to the protonated form, the molecular form of DBI could more tightly interact with iron surface. These results show that the long-chain alkyl-substituted benzimidazole derivative is of great potential application as corrosion inhibitor.