1,5-Dimethyl-4-((2-methylbenzylidene)amino)-2-phenyl-1H-pyrazol-3(2H)-one (DMPO) was synthesized to be evaluated as a corrosion inhibitor. The corrosion inhibitory effects of DMPO on mild steel in 1.0 M HCl were investigated using electrochemical impedance spectroscopy (EIS), potentiodynamic polarization, open circuit potential (OCP) and electrochemical frequency modulation (EFM). The results showed that DMPO inhibited mild steel corrosion in acid solution and indicated that the inhibition efficiency increased with increasing inhibitor concentration. Changes in the impedance parameters suggested an adsorption of DMPO onto the mild steel surface, leading to the formation of protective films. The novel synthesized corrosion inhibitor was characterized using UV-Vis, FT-IR and NMR spectral analyses. Electronic properties such as highest occupied molecular orbital energy, lowest unoccupied molecular orbital energy (EHOMO and ELUMO, respectively) and dipole moment (μ) were calculated and discussed. The results showed that the corrosion inhibition efficiency increased with an increase in the EHOMO values but with a decrease in the ELUMO value.