The corrosion degradation behavior and in vivo test of 4N-Mg after surface modification by heat-self-assembled monolayer (HSAM) were studied in this paper. Comprehensive techniques were used to analyze the corrosion process, corrosion rate and corrosion mechanism. The Mg samples with and without modifications were embedded in the thigh bones of white rabbits, and TC4 was used as the control. The concentration of Mg2+ ion in blood were analyzed after 2, 6, and 12 weeks of implantation. Then the specimens were analyzed by scanning electron microscope (SEM), and tissue slices were observed by optical microscope. The results show that the modified Mg had better corrosion resistance. The in vivo study confirmed that the magnesium concentration in blood was in the normal scale, and the Mg have good bone inducement and showed excellent capabilty of contact with bone. After implantations for a few weeks, the new bone obviously mineralizes on the interface between the modified Mg and bone. The untreated magnesium corroded faster than the HSAM treated magnesium in vivo. All the results indicated that Mg showed better biocompatibility and the capacity of inducing new bone due to HSAM had an effect on controlling the corrsion rate of Mg.