In order to improve the corrosion resistance, the samples made of Mg-Zn-Zr alloy were immersed in 20% or 40% hydrofluoric acid (HF) aqueous solutions for different intervals to prepare magnesium fluoride (MgF2) coating on the surface. By comparing the surface morphologies, the samples immersed in 20% HF solution for 6 h on which fine particles in nanoscale covered was selected for the further study. Immersion and electrochemical tests showed that the dense MgF2 coating would improve the corrosion resistance of Mg-Zn-Zr alloy. The corrosion current density (icorr) decreased from 2.10 μA·cm-2 to 0.05 μA·cm-2. The influence of HF treatment on the cytocompatibility was evaluated in vitro. There were significant differences in the cell number between the naked and coated samples after culturing for 3 and 5 days (p<0.05). All the results demonstrate that HF treatment is a promising approach to improve the corrosion resistance and in vitro biocompatibility of Mg-Zn-Zr alloy used as intravascular stents.