It was shown that polyethylene glycol molecules act as good corrosion inhibitors. Quantum chemical simulation showed the effect of molecular weight on studying polymers with repeating units 1, 2, 3, 4, and 5 and also polymers with high molecular weights with repeating units 10, 20, and 30. Using the density functional theory at the B3LYP/6-31G+(d,p) basis set level, ab initio calculations using the HF/6-31G+(d,p) and semi-empirical PM3 methods were performed on polyethylene glycol to investigate the correlation between its molecular structure and the corresponding inhibition efficiency. The calculated parameters include the highest occupied molecular orbital, the lowest unoccupied molecular orbital, the separation energy (ΔE), the dipole moment (μ), the softness (σ), the fraction of electrons transferred from the inhibitor to the metal surface (ΔN), the electronegativity (χ), the hardness (η), and the total negative charge. Furthermore, the adsorption energies of the inhibitors with the aluminum (1 1 1) surface were studied using the molecular dynamic method. A good correlation between the theoretical data and the experimental results was found.