In this study, the XC40 carbon steel corrosion inhibition performance and the corresponding mechanisms of new triazole-based compound 2-(((4H-1,2,4-triazol-4-yl)imino)methyl)-4-bromophenol in 1.0 M hydrochloric acid (HCl) solution were investigated using weight loss measurement, potentiodynamic polarization and electrochemical impedance spectroscopy (EIS) techniques. Results from electrochemical measurements showed that the triazole-based compound were effective in inhibiting corrosion in acidic medium, such that the inhibition efficiency increased with increasing inhibitor concentration due to the adsorption of the inhibitor molecules on the metal surface. The maximum value was achieved at 10-3 M at 25 °C, which was approximately 93.6%, 94.6% and 90.55%, according to the potentiodynamic polarization curves, EIS results and weight loss measurement, respectively. Additionally, with the temperature ranging from 25 to 55 °C, the corrosion inhibition ability of these compound was decreased. The polarization curves show that this compound act as a mixed-type inhibitor with predominantly anodic characteristics. In addition, it was established the Langmuir adsorption isotherm fits well with the experimental data. Finally, the inhibition efficiency of the triazole-based compound was discussed in terms of adsorption and protective film formation.