The green corrosion inhibitors serve recently as a source of environmentally friendly materials in the corrosive media. Herein, an environmentally friendly green inhibitor based on Myrtus communis oil, noted (MCO) was applied for corrosion mitigation of mild steel (MS) surface in 1.0 M HCl solution. The corrosion inhibition characteristics were examined applying weight loss and electrochemical (Electrochemical impedance spectroscopy and potentiodynamic polarization) techniques. The results obtained for MCO showed a good inhibition effect on the mild steel in the 1.0 M HCl solution. Based on the EIS examination, the inhibition efficiency was found to increase with a corresponding increase in the MCO concentration, and the best inhibition of 92% occurred at a MCO concentration of 2.5 g/L. The potentiodynamic studies revealed that investigated MCO acts as mixed type inhibitor, i.e. the corrosion suppression occurred via retardation of combined cathodic and anodic reactions. The weight loss analysis proved 93% inhibition efficiency for the acid solution containing 2.5 g/L of MCO. By enhancing the solution temperature, the steel resistance against corrosion decreased, and the efficiencies of 93, 87, 84, and 82% were obtained at 303, 313, 323, and 333 K, respectively. Activation parameters were calculated and discussed. The studied inhibitor obeyed Langmuir's adsorption isotherm.