In order to improve corrosion and wear resistance of magnesium alloy, Al coating was prepared on the AZ31 magnesium alloy by the thermal spraying, then the Al-rich layer was obtained by using a CO2 laser re-melting. The microstructures and phases of the alloying layer were analyzed by canning electron microscope (SEM) and X-ray diffraction apparatus (XRD). The mechanical properties were investigated by using hardness measurement and ring-on-flat apparatus. The corrosion behaviour was investigated in 3.5% (mass fraction) NaCl solution by electrochemical measurements. The results show that there are several different microstructures in the alloying layer, such as columnar, snowflake and network structure; the alloying layer consist of Mg2Al3, Mg17Al12 and α-Mg phases. The microhardness of alloy layer is about 170HV, higher than that of the AZ31 matrix (about 50HV). The wear tests show that the wear resistance of alloying layer is considerably improved comparing with the matrix. The potentiodynamic polarization results indicate that the corrosion resistance by laser alloying is enhanced.