Corrosion inhibitors are added in low concentrations to corrosive solutions for reducing the corrosion rate of a metallic material. Their mechanism of action is typically the blocking of free metal surface by adsorption, thus slowing down dissolution. This work uses electrochemical impedance spectroscopy to show the cyclic oligosaccharide beta-cyclodextrin (beta-CD) to inhibit corrosion of zinc in 0.1M chloride with an inhibition efficiency of up to 85%. Only a monomolecular adsorption layer of beta-CD is present on the surface of the oxide covered metal, with Raman spectra of the interface proving the adsorption of the intact beta-CD. Angular dependent X-ray photoelectron spectroscopy (ADXPS) and ultraviolet photoelectron spectroscopy (UPS) were used to extract a band-like diagram of the beta-CD/ZnO interface, showing a large energy level shift at the interface, closely resembling the energy level alignment in an n-p junction. The energy level shift is too large to permit further electron transfer through the layer, inhibiting corrosion. Adsorption hence changes the defect density in the protecting ZnO layer. This mechanism of corrosion inhibition shows that affecting the defect chemistry of passivating films by molecular inhibitors maybe a viable strategy to control corrosion of metals.