Hydroxyethyl cellulose (HEC) was studied as corrosion inhibitor for mild steel and aluminium in 0.5 M H2SO4 solution using weight loss and electrochemical techniques. The results revealed that HEC inhibited corrosion of mild steel and aluminium in sulphuric acid environment. Inhibition efficiency was found to depend on concentration of the inhibitor. Impedance results revealed that HEC was adsorbed on the corroding metal surface while polarization results show that HEC inhibited both anodic and cathodic reactions of mild steel but showed anodic dissolution reaction on aluminium due to destabilization of the passive oxide film on the Al surface and inhibited only cathodic reaction. Inhibition of corrosion reaction in the acidic medium by adsorption on the metal/solution interface follows Langmuir and Freundlich adsorption isotherms. Also, inhibition efficiency increased with rise in temperature. Local reactivity of the HEC molecule was analyzed theoretically using the density functional theory. The theoretical predictions showed good agreement with experimental results.