We describe a combined experimental and density functional study of the corrosion protection of Q235 carbon steel in 0.25M H2SO4+0.5M NaCl solution by Moringa oleifera extract. The extract was characterized for this purpose using Furrier transformed infra-red spectroscopy (FTIR) and gas chromatography interfaced with mass spectroscopy (GC–MS). Corrosion protection efficiency increased with extract concentration but decreased slightly over prolonged exposure time. The various electrochemical and spectroscopic measurements revealed adsorption of organic constituents of the extract on the steel surface, while the protective effect of the adsorbed extract constituents was confirmed by surface microscopy examinations. Density functional theory calculations were undertaken to describe the electronic and adsorption properties of the constituents identified in the extract.