6-bromo-2-oxo-1,2-dihydroquinoline-4-carboxylic acid (P2) as a new corrosion inhibitor was synthesized in the present work. The corrosion inhibition of P2 in hydrochloric acid for mild steel was evaluated by potentiodynamic polarization measurements, electrochemical impedance spectroscopy, weight loss measurements, and DFT. The results indicate that the P2 is mixed type inhibitor, and the adsorption of P2 on mild steel surface obeys Langmuir isotherm. In addition, the inhibition efficiency increases with increasing the concentration of inhibitor. Correlation between quantum chemical calculations and inhibition efficiency of the investigated compound is discussed using the Density Functional Theory method (DFT).