Tungsten-based two-dimensional transition metal dichalcogenides (TMDs) is a promising non-precious metal catalyst that can be applied to drive photocatalytic removal of harmful gases. However, the photocatalytic performance of these promising tungsten-based TMDs is limited by low carrier separation efficiency. In order to promote the separation efficiency of photogenerated carriers, it is a useful strategy to introduce a trace amount of precious metal Ag into tungsten-based TMDs. Due to the presence of precious metal Ag, the separation efficiency of photogenerated carrier is significantly improved. The photocatalytic removal potential of single-atom Ag with tungsten-based TMDs substrate for harmful gases was demonstrated in this work. Specifically, the effects of trace Ag atom and its load on the light absorption spectra, work function, band structure and density of states of tungsten-based TMDs were discussed by first principles calculations, among which tungsten-based TMDs substrate included 2 H-WS2, 2 H-WSe2 and 2 H-WTe2. It was found that Ag@2 H-WS2 and Ag@2 H-WSe2 possess strong light absorption capacity, low electron escape work and suitable band structure for photocatalysis. Through cohesive energy, formation energy and molecular dynamics, it was found that Ag@2 H-WSe2 possesses excellent stability, while Ag@2 H-WS2 may be unstable. Thus, Ag@2 H-WSe2 was identified as a new photocatalyst with broad application prospects. Finally, taking NH3, H2S, NO2 and SO2 as model harmful gases, it was proved that Ag@2 H-WSe2 can effectively photocatalyze the removal of harmful gases by differential charge density, projected density of states and energy barrier calculations. The above calculations indicates that Ag@2 H-WSe2 exhibits excellent photocatalytic activity and stability, and is a promising photocatalyst.