The Prosopis juliflora extract was investigated as a corrosion inhibitor for mild steel in 1M HCl using weight loss measurements, potentiodynamic polarization, and electrochemical impedance spectroscopy (EIS). The inhibition efficiency of Prosopis juliflora increases with an increase in inhibitor concentration and temperature. Polarization studies revealed that Prosopis juliflora acts as a mixed type inhibitor for mild steel in 1M HCl. AC impedance indicates that the value of charge transfer resistance increases with the increase in inhibitor concentration. Thermodynamic parameters like activation energy, enthalpy, entropy and free energy were calculated. The surface morphology of Prosopis juliflora shows a significant improvement of the mild steel surface.