The corrosion inhibition of 5-O-β-D-glucopyranosyl-7-methoxy-3′,4′-dihydroxy-4-phenylcoumarin (4-PC) in AISI 1018 steel immersed in 3% NaCl + CO2 was studied by electrochemical impedance spectroscopy (EIS). The results showed that, at just 10 ppm, 4-PC exerted protection against corrosion with ղ = 90% and 97% at 100 rpm. At static conditions, the polarization curves indicated that, at 5 ppm, the inhibitor presented anodic behavior, while at 10 and 50 ppm, there was a cathodic-type inhibitor. The inhibitor adsorption was demonstrated to be chemisorption, according to the Langmuir isotherm for 100 and 500 rpm. By means of SEM–EDS, the corrosion inhibition was demonstrated, as well as the fact that the organic compound was effective for up to 72 h of immersion. At static conditions, dispersion-corrected density functional theory results reveal that the chemical bonds established by the phenyl group of 4-PC are responsible of the chemisorption on the steel surface. According with Fukui reactivity indices, the molecules adsorbed on the metal surface provide a protective cover against nucleophilic and electrophilic attacks, pointing to the corrosion inhibition properties of 4-PC.