The specific gravity and elastic modulus of magnesium alloys are similar to that of human bone. Magnesium is one of the most important elements in the human body and plays a key role in the metabolic process. But the application of magnesium is seriously limited as a biomaterial since it corrodes easily in the physiological environment of the body. In order to reduce the corrosion, we developed protective films using rare earth (RE) conversion processing. The surface of magnesium samples was modified by contact with different rare-earth salt solutions; then the samples were dipped in SBF to test their corrosion resistance. The change of mass and the pH of the solutions were measured continuously using an electronic scale and a pH micrometer. The surface microstructure of the samples was observed by XRD and metallomicroscope. Corrosion rates of the samples in SBF were determined using Taffier curve. The preliminary results show that the conversion treatment with CeCl3 or Y(NO3)3 can improve the corrosion resistance of magnesium in SBF. The relationship of the RE salts concentration and the corrosion properties were studied,the best combination of parameters was determined, and the formation mechanism of rare-earth conversion film has been also elaborated.