Mg alloy AZ31 is an attractive candidate for coronary artery stents, as it possesses excellent biocompatibility in human body and good mechanical properties. However, AZ31 magnesium alloys generally have poor corrosion resistance in the body environment. This paper reports on the early stages of an investigation into the corrosion mechanism and the morphology of corrosion of AZ31 in simulated body fluid (SBF). The investigation will also consider ways of improving corrosion resistance of this alloy in SBF through the use of ionic liquids. The results to date have shown that AZ31 suffers severe localized pitting corrosion in SBF. The pits mainly develop adjacent to the Al-Mn intermetallic second phase in the α matrix. Energy Dispersive X-Ray Spectroscopy results revealed the presence of Mg, O, Ca, and P in the layer of corrosion product. Treatment of the AZ31 alloy prior to corrosion testing in SBF with the ionic liquid trimethyl (butyl) phosphonium diphenyl phosphate (P1444DPP) produced some increase in the corrosion resistance of the alloy