Corrosion inhibition of N80 steel in a 15% HCl solution was studied using two synthesized triazine derivatives, namely: N2-(4-(2-amino-6-(4-methoxyphenyl)pyrimidine-4-yl)phenyl)-N4,N6-diphenyl-1,3,5-triazine-2,4,6-triamine (APTT) and N2-(4-(5-(4-methoxyphenyl)isoxazol-3-yl)phenyl)-N4,N6-diphenyl-1,3,5-triazine-2,4,6-triamine (MITT) using gravimetric measurement, potentiodynamic polarization and electrochemical impedance spectroscopy (EIS) techniques. The inhibition efficiency was found to increase with increasing inhibitor concentrations and decreases with increasing temperatures. Some thermodynamic and kinetic parameters were calculated and discussed. The adsorption of inhibitor on N80 steel surface, obeyed the Langmuir adsorption isotherm. Polarization studies showed that both inhibitors behave as mixed-type inhibitors. Scanning electron microscopy (SEM), energy dispersive X-ray spectroscopy (EDX), FTIR, UV–visible spectroscopy and atomic force microscopy (AFM) were performed for surface analysis of the uninhibited and inhibited N80 steel samples. The density functional theory (DFT) was employed for theoretical calculations and the results obtained were found to be consistent with the experimental findings.