Hafnium nitride (HfN) possesses excellent mechanical properties such as high hardness and wear resistance, and is usually used as a protective coating on high-end equipment and precision instruments. Nevertheless, the high coefficient of friction of HfN coating poses a serious threat to equipment and instruments, so doping modifications are imperative. Here, HfN coatings doping with different Ag contents were prepared by magnetron sputtering. It was found in the experiments that the introduction of a trace amount of Ag atoms (∼1.85 at.%) could replace the Hf atoms in the HfN sublattice, resulting in a solid solution Hf-Ag-N. As compared with the pure HfN coating (20.3 GPa), the solid solution Hf-Ag-N coating has higher hardness (25.5 GPa), lower coefficient of friction (μ = 0.28) and lower wear rate (3.03 × 10−8 mm3/(N·mm). With increasing Ag content, solid solution structure disappears and a nanocomposite structure forms, leading to a sharp decrease in hardness of Hf-Ag-N coating due to the precipitation of soft Ag phase. Additionally, X-ray photoelectron spectroscopy and Raman spectrum analysis revealed that the reason for the low coefficient of friction of Hf-Ag-N solid solution coating is mainly due to the large number of tribo-oxidation products (HfO2, Ag2O) and self-lubricating phase (Ag) on the worn surface. The density functional theory further confirms that Ag atoms in solutes promote spontaneous oxidation of Hf-Ag-N which is important for causing tribo-oxidation. The results of this study expect to provide new idea as well as certain theoretical basis for designing new protective coatings.