A new technique has been developed for improving corrosion resistance on magnesium alloys. Specimens of AZ31 magnesium alloy were dipped into molten salt of NaBF4 at 723 K for various times, and then cooled, rinsed with water, and dried in air. Corrosion resistance in the surface treated specimens was evaluated by salt immersion test using 1 % NaCl solution as a time for occurring filiform corrosion. On an un-treated AZ31 alloy, the time for starting the filiform corrosion was about 1.2 ks, while on the surface treated specimen, the time was prolonged into about 1300 ks. Moreover, the surface treated specimen showed corrosion resistance in low pH solutions, such as 1 % HNO3 and HCl solutions.