Adsorption of 2-mercaptobenzimidazole (MBI) and 2-mercaptobenzoxazole (MBO) compounds on the mild steel surface exposed to a phosphoric acid solution was investigated by electrochemical impedance spectroscopy (EIS). Evaluation of electrochemical measurements in test solutions showed that by increasing the immersion time from 15 to 240 min corrosion resistance of samples immersed in the solutions containing MBI and MBO increased. MBI showed a higher corrosion inhibition compared to MBO which indicates its higher adsorption on the mild steel surface. Superior adsorption of MBI on the surface in comparison to MBO could be attributed to the easier protonation of MBI.