By means of reaction magnetron sputtering, TiAlN ternary compound films were deposited on AZ91D magnesium alloy substrates. The influence of partial pressure ratio of N2 to Ar (N2/Ar) on the microstructure and properties of TiAlN film was explored with scanning electron microscopy (SEM), X-ray diffraction (XRD), and tests of microhardness, hydrophile and corrosion resistance. The results show that with the increase of N2/Ar partial pressure ratio from 0.5:10 to 1.5:10, Ti2N becomes the main film phase and the size of the crystals cluster decreases. As the N2/Ar ratio is as higher as 2:10, the film crystals change from Ti2N to TiN with coarse clusters. With increase of N2/Ar rate, the hardness, hydrophobic nature and corrosion resistance of the TiAlN film tend to increase.