By using cyclic and linear sweep voltammetry,the electrochemical deposition behaviors of Mg^2+ and B^3+ in fluorides molten salts of KF-MgF2 and KF-KBF4 at 880℃ were investigated,respectively.The results show that the electrochemical reduction of Mg^2+ is a one-step reaction as Mg^2++2e-→Mg in KF-1%MgF2 molten salt,and the electrochemical reduction of B^3+ is also a one-step reaction as B^3++3e-→B in KF-KBF4 (1%,2% KBF4) molten salts.Both the cathodic reduction reactions of Mg^2+ and B^3+ are controlled by diffusion process.The diffusion coefficients of Mg^2+ in KF-MgF2 molten salts and B^3+ in KF-KBF4 molten salts are 6.8×10^-7 cm^2/s and 7.85×10^-7 cm^2/s,respectively.Moreover,the electrochemical synthesis of MgB2 by co-deposition of Mg and B was carried out in the KF-MgF2-KBF4 (molar ratio of 6:1:2) molten salt at 750℃.The X-ray diffraction analysis indicates that MgB2 can be deposited on graphite cathode in the KF-MgF2-KBF4 molten salt at 750℃.