The invention provides a method for preparing a magnesium alloy. The method comprises the following: solution treatment process: heating a cast magnesium alloy to 350 to 550 DEG C and performing heat preservation treatment, wherein the cast magnesium alloy has the following atomic ratio composition: Mg1-a-bREaZrb, wherein RE is one or more of Y, Sc, La, Ce, Pr, Nd, Pm, Sm, Eu, Gd, Tb, Dy, Ho, Er, Tm, Yb and Lu; a is equal to or more than 1 percent and equal to or less than 6 percent; b is equal to or more than 0.05 percent and equal to or less than 0.5 percent; hot extrusion process, performing heat extrusion on the magnesium alloy subjected to the heat preservation treatment at the temperature of between 350 and 550 DEG C and then fast cooling the obtained product to the room temperature; cold rolling process, performing cold rolling on the magnesium alloy subjected to the heat extrusion at the rolling reduction of 5 to 50 percent; and ageing process, performing ageing treatment on the magnesium alloy subjected to the cold rolling. The yield strength of the prepared Mg-Gd-Zr alloy reaches 447MPa.