Abstract The loss of boron (B) in the rack plate steel during the electroslag remelting process has a significant impact on its mechanical properties. Therefore, it is necessary to design appropriate slags to suppress the loss of B. CaF2–CaO–Al2O3 phase diagram was calculated to determine the basic slag. The influence of MgO and B2O3 on the performance of the basic slag was studied to determine the optimal amount of MgO addition. The equilibrium reactions between rack plate steel and the 50.48 mass% CaF2–24.81 mass% CaO–24.71 mass% Al2O3–2 mass% MgO-y mass% B2O3 (y was 1–10) slag were studied to examine the variation in B content in the steel. Results indicate the presence of a temperature-qualified eutectic point in the CaF2–CaO–Al2O3 phase diagram. With an increase in MgO content in the slag, the melting temperature of the basic slag initially decreases and then increases, while the electrical conductivity decreases. On the other hand, B2O3 reduces the melting point of the slag and increases the equilibrium B content in the steel. The 50.48 mass% CaF2–24.81 mass% CaO–24.71 mass% Al2O3–2 mass% MgO-y mass% B2O3 (y was 5–7) slag can achieve the target range of B content in the steel, and its viscosity meets the requirements of electric slag remelting.