High hardness improves the material’s load-bearing capacity, resulting in the enhancement of tribological properties. However, the high hardness is difficult to achieve for TiAlN coating due to the transformation of the close-packed structure from cubic to hexagonal and the increase in the grain size when the Al content is high. In the present study, the ultrahard TiAlN coatings (hardness > 40 GPa) are successfully developed by filtered cathodic vacuum arc technology to study the effect of nitrogen flux rate on tribological behaviors. The highest hardness of 46.39 GPa is obtained by tuning the nitrogen flux rate to achieve the regulation of Al content and the formation of nanocrystalline. The stable fcc TiAlN phase is formed via the solid-phase reaction under a high nitrogen concentration, and more aluminum atoms replace the titanium atoms in the (Ti, Al)N solid solution. The high Al content of the Ti0.35Al0.65N coating has a nanocrystalline structure and the average crystalline size is 16.52 nm. The TiAlN coating deposited at a nitrogen flux rate of 60 sccm exhibits the best properties of a combination of microhardness = 2972.91 Hv0.5, H = 46.39 GPa, E = 499.4 Gpa, ratio H/E* = 0.093 and ratio H3/E*2 = 0.403. Meanwhile, the TiAlN coating deposited at 60 sccm shows the lowest average friction coefficient of 0.43 and wear rate of 1.3 × 10−7 mm3 N−1 m−1 due to the best mechanical properties.