WS 2 –Ag composite films were deposited on medium carbon steel substrate by magnetron co-sputtering method. The morphology and microstructure of the films were characterized by X-ray diffraction (XRD), scanning electron microscopy (SEM), energy dispersive X-ray spectroscopy (EDS) and transmission electron microscopy (TEM). The tribological behavior was investigated using a ball-on-disk tribometer in vacuum and in humid air. The crystalline Ag phase dispersed in amorphous WS 2 and the size of the crystalline Ag increased with the Ag content in the films. The mechanical and tribological properties of WS 2 –Ag composite films varied with the Ag content. At the content of 41 at.% Ag, the composite film had the highest microhardness and elastic modulus. The amorphous WS 2 in the WS 2 –Ag41% composite film made the main function during wear, so the film showed the lowest friction coefficient. The friction coefficients of the WS 2 –Ag composite films in vacuum were lower and more stable than those in humid air, but the environmental sensitivity of tribological behavior decreased obviously due to the addition of Ag in the films.