Al–air battery has been regarded as a promising new energy source. However, the self-corrosion of aluminum anode leads to a loss of battery capacity and a decrease in battery longevity, limiting its commercial applications. Herein, indole-2-carboxylic acid (ICA) has been added to 4 M NaOH as a corrosion inhibitor. Its impact on the self-corrosion of aluminum alloy and the enhancement of the functionality of Al–air batteries at various concentrations have been investigated. X-ray photoelectron spectroscopy (XPS), attenuated total reflection Fourier transform infrared (ATR-FTIR) spectroscopy, atomic force microscopy (AFM), and scanning electron microscopy (SEM) techniques have been used to examine the compositional and morphological alterations of aluminum alloy surfaces. Electrochemical and hydrogen evolution tests showed that indole-2-carboxylic acid is an efficient corrosion inhibitor in alkaline solutions, and its impact grows with concentration. Our findings demonstrated that when the inhibitor concentration is 0.07 M, the inhibition efficiency is 54.0%, the anode utilization rises from 40.2% to 79.9%, the capacity density increases from 1197.6 to 2380.9 mAh g−1, and the energy density increases from 1469.9 to 2951.8 Wh kg−1. In addition, theoretical calculations have been performed to support the experimental results.