ZrNx films were deposited by DC magnetron sputtering with pure Zr target in different nitrogen partial pressure atmospheres (r = N2/[Ar + N2]). The structure and composition of the thin films were characterized as a function of r using scanning electron microscope, glancing angle X-ray diffraction, and X-ray photoelectron spectroscopy. The hardness, adhesive strength, and corrosion behavior of the coatings were measured by nanoindentation, microscratch, and potentiodynamic measurements in 3.5 wt% NaCl solution. The results show that the structure of the ZrNx films changes from a nearly stoichiometric ZrN with a typical columnar structure to mixed phases composited of ZrN and α-ZrNx with a dense glass structure as r increases from 12% to 50%. The mechanical properties including hardness, elastic modulus, and adhesion decrease with increasing r due to nonstoichiometric compound and glass phase structure of the coatings, while the dense glass structure significantly improves the corrosion inhibition.