Two-dimensional transition metal dichalcogenides (2D TMDs), such as WS 2 , are considered to have the potential for high-performance gas sensors. It is a pity that the interaction between gases and pristine 2D WS 2 as the sensitive element is too weak so that the sensor response is difficult to detect. Herein, the sensing capabilities of Al-and Pdoped WS 2 to NO, NO 2 , and SO 2 were evaluated. Especially, we considered selectivity to target gases and dopant concentration. Molecular models of the adsorption systems were constructed, and density functional theory (DFT) was used to explore the adsorption behaviors of these gases from the perspective of binding energy, band structure, and density of states (DOS). The results suggested that doping atoms could increase the adsorption strength between gas molecules and substrate. Besides, the sensitivity of P-doped WS 2 to NO and NO 2 was hardly affected by CO 2 or H 2 O. The sensitivity of Al-doped WS 2 to NO 2 and SO 2 was also hard to be affected by CO 2 or H 2 O. For NO detection, the WS 2 with 7.4% dopant concentration had better sensitive properties than that with a 3.7% dopant concentration. While for SO 2 , the result was just the opposite. This work provided a comprehensive reference for choosing appropriate dopants (concentration) into 2D materials for sensing noxious gases.