Ab initio quantum chemical calculations at the density functional theory (DFT) level were performed on eight pyridine derivative molecules as corrosion inhibitors for iron in an acidic solution. In this regard, the geometry of the molecules were optimized using the B3LYP/6-31G** method first, and then interactions of these optimized structures with the iron atom were explored using the B3LYP/LANL1MB method. Two modes of adsorption were considered, i.e., planar adsorption (P) via the pyridine ring and vertical adsorption (V) through a nitrogen atom. The interaction energy was minimized through the variation of the inhibitor molecule-iron atom distance. These minimum energy values, along with the values of induced charge on the iron atom, were used to compare the inhibition power of various pairs of pyridine derivatives under consideration. Compared with the experimental data, the P orientation seems to be more satisfactory, if the minimum energy values are considered alone. However, the V orientation is in accordance with the experiment, if the induced charge on iron is considered. This is attributed to the effect of the induced charge on reducing the original surface charge of iron. It may be concluded that the P orientation is more favorable at low coverage and the V orientation at high coverage because of the excessive diminishing of the charge on the iron surface and area releasing through the P → V reorientation.