Quantum chemical calculations using the density functional theory (B3LYP/6-31G* DFT) and semi-empirical AM1 methods were performed on ten pyridine derivatives used as corrosion inhibitors for mild steel in acidic medium to determine the relationship between molecular structure and their inhibition efficiencies. Quantum chemical parameters such as total negative charge (TNC) on the molecule, energy of highest occupied molecular orbital (E HOMO), energy of lowest unoccupied molecular orbital (E LUMO) and dipole moment (μ) as well as linear solvation energy terms, molecular volume (Vi) and dipolar-polarization (π*) were correlated to corrosion inhibition efficiency of ten pyridine derivatives. A possible correlation between corrosion inhibition efficiencies and structural properties was searched to reduce the number of compounds to be selected for testing from a library of compounds. It was found that theoretical data support the experimental results. The results were used to predict the corrosion inhibition of 24 related pyridine derivatives.