The inhibition effect of 2-(quinolin-2-yl)quinazolin-4(3H)-one on the corrosion of Q235 steel in 1mol/L HCl solution was investigated by means of potentiodynamic polarization curves, electrochemical impedance spectroscopy (EIS), scanning electron microscopy (SEM)/energy dispersive X-ray spectroscopy (EDX), Fourier-transform infrared (FTIR) spectroscopy and X-ray photoelectron spectroscopy (XPS) methods. The experimental results reveal the 2-(quinolin-2-yl)quinazolin-4(3H)-one has a good inhibiting effect on corrosion of Q235 steel in 1mol/L HCl solution. Polarization studies show that the 2-(quinolin-2-yl)quinazolin-4(3H)-one is a mixed-type inhibitor. The adsorption of the inhibitor on steel surface obeys Langmuir adsorption isotherm and contains both physisorption and chemisorption. On the basis of surface analysis and characterization, the formation and characteristic of an adsorption-related protective inhibitor film on the steel surface have been verified. Finally, the mechanisms of corrosion and protection of the Q235 steel by the quinoline derivative inhibitor have been proposed.