A polypyrrole (PPy) coating modified by sodium fluoride (NaF) and polyethylene glycol 4000 (PEG) on AZ31 magnesium alloy is reported. The aim of this work was to obtain a composite coating with NaF and PEG in PPy matrix by electropolymerisation process. The idea was to form a stable PPy coating with higher resistance to corrosion damage. Prior to this process, the effect of sodium salicylate pre-treatment on PPy electropolymerisation was investigated by cyclic voltammetry technique. Electrochemical impedance spectroscopy (EIS) and polarisation analysis was performed in 0.05 M NaCl solution to characterise the corrosion behaviour of each sample. EIS results showed that the addition of NaF and PEG could enhance the corrosion resistance (R ct) of PPy coating. Also, the corrosion current density for NaF + PEG (incorporated in PPy) was demonstrated a value 60 times lower than that of bare AZ31 Mg alloy. The better corrosion behaviour of PPy composite coating with NaF and PEG was attributed to inhibition effect of fluoride which could act as barrier for Mg alloys. Moreover, PEG can stabilise the PPy structure because of its high oxygen content. Furthermore, the addition of NaF and PEG simultaneously could show a synergistic behaviour because of the positive effect of PEG on fluoride mobility.