In this research, the Pistia stratiotes leaf (PSL) extract was evaluated as a green corrosion inhibitor for the corrosion of mild steel in 1 M HCl using electrochemical measurements and surface characterization. Electrochemical impedance spectroscopy (EIS) spectra showed that the inhibitory activity of the phytochemical compounds enhanced with increasing concentration up to 400 ppm, which was reflected in the increase in the charge transfer resistance and double-layer capacitance. Regarding the effect of immersion time, EIS results indicated that the persistence of the PSL extract was between 4 h and 8 h of exposure time. From polarization curve (PCC) results, the best performance of the corrosion inhibitor was achieved at 400 ppm with an inhibition efficiency of 93.7%. The PSL extract acted as a mixed-type corrosion inhibitor. The adsorption of the phytomolecules on the metal surface obeyed the Langmuir isotherm through a mixed mechanism (physical and chemical interactions) dominated by physisorption. Scanning electron microscopy (SEM) examinations and energy-dispersive X-ray spectroscopy (EDS) elemental analysis of the corroded samples confirmed the anticorrosive protection of the PSL extract. Chemical characterization of the PSL extract by GC-MS revealed the presence of phytol, steroids, and aromatic and long-chain unsaturated fatty acid esters, in order of abundance. Chemical quantum calculations by DFT allowed for determining that the phthalic acid, di(2-propylpentyl) ester compound has the most significant potential to act as the main active component in corrosion inhibition activity.