This invention discloses a method for preparing low-cost heat-resistant Mg alloy containing rare earth, which is prepared by: adding Mg/rare earth intermediate alloy into molten AZ91D, AM50B or AM60B Mg alloy, and die-casting. The rare earth content of the heat-resistant Mg alloy is 0.1-3.0 wt.%, and the rare earth is one of La, Pr, Sm, Eu, Tb, Ho, Er, Tm, Dy, Gd, Ce, Y, Ce-rich mixed rare earths and Nd-rich mixed rare earths. The method comprises: smelting Mg/rare earth intermediate alloy ingot (rare earth content = 10-60 wt.%), pressing into wire or rod, melting AZ91D, AM50B or AM60B Mg alloy, cutting Mg/rare earth intermediate alloy wire or rod, preheating, adding into molten AZ91D, AM50B or AM60B Mg alloy, and die-casting into heat-resistant Mg alloy. The heat-resistant Mg alloy has largely increased creep resistance at 120-200 deg.C, and can be used in cylinder body, automatic gear box, oil pump and crankcase.