Zirconium nitride (ZrN) films were deposited on AZ91 magnesium alloy substrate using the technique of reactive ion beam sputtering at a varying nitrogen flow rate F(N_2 )=f(N_2)/f(N_2+Ar)=0.3-0.6. The purpose of this study was to investigate the effect of the F(N2) ratio on evaluations for structural and corrosion resistance of the produced ZrN film. The ZrN(111) orientation was the dominant and preferred orientation in all coated samples. For most of the samples, crystallite sizes of the ZrN film reduced according to an increment of nitrogen flow rate but the microstrain value increased. The best corrosion resistance was observed for the nitrogen flow rate of 0.5.