The chemical composition, structure and mechanical properties of hafnium oxide films with different nitrogen constituents were investigated. X-ray photoelectron spectrum analysis showed that nitrogen atoms acted as oxygen substitution and interstitial atoms. The crystalline features exhibited no change during nitrogen doping. Nevertheless, the films with high compressive stress displayed significantly enhanced mechanical properties. The enhanced mechanism could mainly be attributed to the dislocation obstacle motion by inserting nitrogen atoms.