This research aimed to examine the influence of green inhibitor extracted from Parthenium hysterophorus (PHS) on the corrosion behaviour of AZ31 Mg alloy in 3.5 wt% NaCl solution. The assessments were done through immersion and polarisation tests with different concentration of PHS extract. The immersion test findings showed that the presence of PHS extract of 250 ppm concentration enhanced the inhibition efficiency to 82%. At 303 K, the corrosion rate in bare NaCl solution is 0.41 mpy, increasing to 0.98 mpy at 353 K. With the addition of 250 ppm PHS, the corrosion rate drops by 82% at 303 K and by 61% at 353 K, demonstrating effectiveness of PHS in reducing corrosion, even at elevated temperatures. The Arrhenius plot confirmed the increase in activation energy from 15.26 to 28.37 KJ/mol with an increase in PHS concentration. The entropy of adsorption is calculated as 56.20 J/mol K from Langmuir adsorption plot.