Abstract Magnesium alloys containing rare earth elements (RE) have received considerable attention in recent years due to their high mechanical strength and good heat-resisting performance. Among them, Mg–5%Y–4%RE (WE54) magnesium alloy is a high strength sand casting magnesium alloy for use at temperatures up to 300 °C, which is of great interest to engineers in the aerospace industry. In the present work, the solidification behavior of Zr-containing WE54 alloy and Zr-free alloy was investigated by computer-aided cooling curve analysis (CA-CCA) technique. And the solidification microstructure and mechanical properties of them were also investigated comparatively. It is found from the cooling curves and as-cast microstructure of WE54 alloy that the nucleation temperature of α-Mg in WE54 alloy increases after Zr addition, and the as-cast microstructure of the alloy is significantly refined by Zr. While the phase constitution of WE54 alloy is not changed after Zr addition. These phenomena indicate that Zr acts as heterogeneous nuclei during the solidification of WE54 alloy. Due to refined microstructure, the mechanical properties of Zr-containing WE54 alloy is much higher than Zr-free WE54 alloy.