The emissions of SO2 and NO2 gases in the atmosphere through different sources can cause environmental problems such as air pollution and acid rain. The electronic properties of gallium nitride nanosheets (GaNNSs) as a semiconductor material can be tuned by transition metals doping. In this work, the adsorption performance of M (M = Fe, Ni and Zn) doped gallium nitride nanosheets (GaNNSs) towards SO2 and NO2 toxic gases were scrutinized by dispersion corrected density functional theory (DFT-D) calculations at PBE-D/DNP level of theory. Specific attention is paid to obtaining insights into the adsorption and sensing features of pristine and M-doped GaNNSs (MGa,N-GaNNS) towards SO2 and NO2 molecules. The energies of adsorption were calculated to be −27.2 kcal mol−1 for SO2-GaNNS and −11.8 kcal mol−1 for NO2-GaNNS complexes. The range of adsorption energies on the M-doped GaNNSs was −8.9 (NO2-ZnGa-GaNNS) to −72.1 (NO2–FeN-GaNNS) and −19.7 (SO2-FeGa-GaNNS) to −51.0 (SO2–FeN-GaNNS) kcal mol−1, indicating that FeN-GaNNS is energetically more favorable than other M-doped GaNNSs for NO2 and SO2 adsorption. The changes in the energy gaps of adsorption complexes revealed that the ZnN-GaNNS and ZnGa-GaNNS could be suitable better for sensing NO2 and SO2 gases, respectively. The present results are helpful not only to understand the adsorption nature of the NO2 and SO2 gases on M-doped GaNNS but also can provide helpful guidance for developing GaN-based sensors.