Surface coatings formed by immersion in the ionic liquids (ILs) 1,3-dimethylimidazolium methylphosphonate (LMP101), 1-ethyl-3-methylimidazolium methylphosphonate (LMP102) and 1-ethyl-3-methylimidazolium ethylphosphonate (LEP102) on magnesium alloy AZ31B at 50 °C have been studied. The purpose of increasing the temperature was to reduce the immersion time, from 14 days at room temperature, to 48 hours at 50 °C. The abrasion resistance of the coated alloy was studied by microscratching under progressively increasing load, and compared with that of the uncoated material. The order of abrasion resistance as a function of the IL is LEP102 > LMP101 > LMP102, which is in agreement with the order obtained for the coatings grown at room temperature. The maximum reduction in penetration depth with respect to the uncovered alloy, of a 44.5%, is obtained for the sample treated with the ethylphosphonate LEP102. However, this reduction is lower than that obtained when the coating is grown at room temperature. This is attributed to the increased thickness and lower adhesion of the coatings obtained at 50 °C, particularly those obtained from methylphosphonate ionic liquids. The results are discussed from SEM-EDX and profilometry.