The electrochemical behavior of aluminum in tannin from Acacia mearnsii bark was evaluated by potentiodynamic polarization curves and electrochemical impedance spectroscopy (EIS) in media under three different pH conditions: acid, alkaline, and neutral. A relationship among pH, polymerization grade (PG), zeta potential, surface, and electrochemical properties was observed in the inhibition performance of the tannin. At high pH, the oligomer structure of the tannin was affected, resulting in a low PG (4) and high zeta potential (−75 mV), and consequently, the inhibition efficiency decreased (68%) in comparison with that in acid (99%) and neutral media (96%). The values obtained indicate a physisorption mechanism for the aluminum corrosion inhibition in the studied conditions.