Fluoride molten-salt electrolytic slag is an important secondary resource for recovery of rare earth elements. In this study, the recovery of rare earths from this source was systemically investigated using borax roasting followed by hydrochloric acid leaching. Increasing the roasting temperature, reaction time and borax dosage promoted the recovery of rare earth elements. The roasting process kinetics was controlled by interfacial chemical reaction, with an activation energy of 159.02 kJ mol−1. The leaching experiments demonstrated that increasing the leaching temperature, time, hydrochloric acid concentration and liquid/solid ratio improved the rare earth recovery. The optimum conditions were identified as roasting the slag at 700°C for 60 min with a borax mass dosage of 38 wt.% and subsequently leaching the resulting rare earth-containing residues in 4 mol L−1 HCl at 60°C at a liquid/solid ratio of 5:1 for 40 min. These conditions gave a rare earth recovery exceeding 97%. This work proposes a novel technical route for efficiently and economically recovering rare earths from this source.