Purification fluxes JDMR-1 containing B2O3 and JDMR-2 containing Na2B4O7 were developed for magnesium alloy. Density, viscosity and melting points of the two fluxes were measured. In the magnesium alloy iron concentration decreased from 0.024% to 0.004% and 0.001%, and average volume fraction of nonmetallic inclusions from 2.06% to 0.86% and 0.23% after JDMR-1 and JDMR-2 processing, respectively. Corrosion resistance and tensile properties of the magnesium alloy were greatly improved. Iron reduction mechanism was studied thermodynamically.