The corrosion inhibition efficiencies (IE%) of 5,5-(1,3-phenylene)bis(4-phenyl-4H-1,2,4-triazole-3-thiol) (abbreviated as BMPTT) and the newly synthesized (bis-1,3-(5-ethylthio-4-phenyl-1,2,4-triazol-3-yl)benzene) (abbreviated as BEPTB) on aluminum corrosion in 1.5 M HCl were studied. The structure of the new inhibitors was confirmed by Fourier transform infrared spectroscopy (FTIR), nuclear magnetic resonance (NMR) analysis, and elemental analysis. Electrochemical polarization, weight loss experiments, as well as quantum chemical techniques were employed to study the anticorrosion activity of the new inhibitors. The corrosion monitoring studies revealed that the protection efficiency increased with increasing concentration and temperature. In the temperature range of 25-45 degrees C studied, the IE% of BEPTB and BMPTT varied within 26-78.2% and 16.2-70.8%, respectively. The results revealed that the IE% of BEPTB was greater than that of BMPTT at all concentrations. Furthermore, they showed the potential ability of both compounds to inhibit Al dissolution in acidic media through physisorption; in addition, increasing the temperature enhanced the physical adsorption of molecules at the aluminum surface to form a protective layer. Both inhibitors obeyed Langmuir's adsorption isotherm on the surface of Al during the inhibition process. The inhibitors mainly slowed down the corrosion process by hindering the cathodic reactions. The molecular DFT calculations differentiated the inhibitors' anticorrosion protection powers, which may be attributed to the polarizability of the S atom and the affordability of electron pairs on the N atom in the compounds. An acceptable agreement was observed between the theoretical method and the other corrosion measuring methods.