The invention discloses a rare earth magnesium alloy welding wire. The rare earth magnesium alloy welding wire is characterized by comprising 2.00-7.00 wt% of Gd, 0.02-2.00 wt% of Y, 0.30-0.80 wt% of Zr, 0.20-0.50 wt% of Sn, 0.02-0.18 wt% of Ag, 0.02-0.18 wt% of Er and the balance magnesium and inevitable impurities. According to the rare earth magnesium alloy welding wire, an Mg-Gd-Y-Zr alloy system capable of being strengthened through heat treatment is selected, and microalloy elements the Gd, the Y, the Zr, the Ag and the Sn are cooperatively added, so that the melt quality is improved, the welding wire quality is improved, and the defects of pore oxide inclusion and the like in a welding joint are reduced; the starting difficulty of a conical surface slippage system is reduced, the plastic deformation capacity of an alloy material is greatly improved by starting a potential slippage system, the extrusion deformation process of a welding wire is coordinated, and the welding wire quality is improved; and low-scale second-phase particles serve as heterogeneous nucleation factors, so that grains are refined, the alloy grain size is controlled, and the extrusion deformation capacity of the material is improved.