The quest for a suitable material with the potential of capturing toxic nitrogen containing gases (NH3, NO, NO2) has motivated us to explore the structural, electronic and gas sensing properties of transition metal dichalcogenides (TMDs); MoSe2 and MoTe2. Spin-polarized density functional theory (DFT) calculations demonstrate weak binding of nitrogen containing gases (NCGs) with the pristine TMDs, which limits the use of the latter as efficient sensing materials. However, suitable elemental substitutions improve the binding mechanism enormously. Our dispersion corrected DFT calculations revealed that Se (Te) substitution with Ge (Sb) in MoSe2 (MoTe2) not only enhance the binding energies but also cause a significant variation in the electronic properties and work functions. A charge transfer mechanism based on Bader analysis indicates that transfer of charges from MoSe2-Ge (MoTe2-Sb) to the NCGs is responsible for the improvement in the binding characteristics. Based on our findings, it is evident that 2.08% of elemental substitutional makes both MoSe2 and MoTe2 promising materials for NH3, NO and NO2 gas sensing.