Using quantum electrochemical approaches based on density functional theory and cluster/polarized continuum model, we investigated the corrosion behavior of aluminum in HCl and NaOH media containing phenol inhibitor. In this regard, we determined the geometry and electronic structure of the species at metal/solution interface. The investigations revealed that the interaction energies of hydroxide corrosive agents with aluminum surface should be more negative than those of chloride ones. The inhibitor adsorption in acid is more likely to have a physical nature while it appears as though to be chemical in basic media. To verify these predictions, using Tafel plots, we studied the phenomena from experimental viewpoint. The studies confirmed that the rate of corrosion in alkaline solution is substantially greater than in HCl media. Moreover, phenol is a potential-molecule having mixed-type inhibition mechanism. The relationship between inhibitory action and molecular parameters was discussed and the activity in alkaline media was also theoretically anticipated. This prediction was in accord with experiment.