In situ white X-ray diffraction was used to investigate the electrochemical alloying and de-alloying processes of Dy-Ni alloys in molten LiCl-KCl-DyCl 3 at 723 K. X-ray diffraction peaks of Ni and DyNi 2 and fluorescence peaks of Dy were obtained. DyNi 2 was the only identified Dy-Ni alloy, although previous ex situ studies have reported the formation of several Dy-Ni alloys. During the dealloying process, the apparent lattice constant of DyNi 2 decreased to a small value. Also, the area of Dy fluorescence peaks increased, which can be attributed to the formation of a Dy compound layer on the electrode surface. Electron backscatter diffraction was performed to clarify the relationship between the crystal orientations of Ni and DyNi 2 after electrochemical alloying or sequential alloying and de-alloying. The results confirmed that Dy-Ni alloying was faster at the Ni grain boundaries. In addition, DyNi 2 or porous Ni grains in reacted regions had similar crystal orientations as adjacent Ni grains in unreacted regions. These results help clarify the rapid electrochemical formation mechanism of Dy-Ni alloys in molten LiCl-KCl, which can help facilitate the separation and recovery of rare-earth elements, such as Dy, from spent magnets.