In this work, for the first time, we have used Primula vulgaris flower extract (PVFE) as a green corrosion inhibitor for mild steel (MS) exposed to 1 M HCl environment. The surface and electrochemical characterizations were carried out using Fourier transform infrared spectroscopy (FT-IR), Ultraviolet-visible spectroscopy (UV-Vis), scanning electron microscope (SEM), atomic force microscope (AFM), contact angle measurements (CA), electrochemical impedance spectroscopy (EIS) and potentiodynamic spectroscopy (PDS). Moreover, to have a clear conception and view from the mechanism of PVFE molecules adsorption on the metal surface, theoretical atomic/electronic investigations including density functional theory (DFT), Monte Carlo (MC) and molecular dynamics (MD) were employed. Almost 95% of the MS surface was covered by the constructed shielding film and the highest recorded inhibition capacity was 95.5% which belonged to 1000 ppm PVFE concentration. Moreover, in this sample, the phase angle values at highest frequency (10 kHz) were -12.7 degrees, -15.35 degrees, and -25.2 degrees which were the highest values among other samples, indicating the intactness of the constructed surficial films. In the blank sample, the corrosion current density found to be 656.15 mu A/cm(2) while in the presence of 1000 ppm PVFE, it was lowered to 36.55 mu A/cm(2) (94.4% inhibition efficiency). The computational MC combined with MD studies illustrated the adsorption of PVFE components and subsequent film formation. The DFT outcomes ensured that the adsorption mechanism is based on donor-acceptor behavior. (C) 2019 Published by Elsevier B.V.