The adsorption of various environmental gas molecules, including H2, N2, CO, CO2, O2, NO, NO2, SO2 H2O, H2S, NH3 and CH4, on the surface of the recently synthesized two dimensional MoSi2N4 (MSN) monolayer has been investigated by means of spin-polarized first-principles calculations. The most stable adsorption configuration, adsorption energy, and charge transfer have been computed. Due to the weak interaction between molecules studied with the MSN monolayer surface, the adsorption energy is small and does not yield any significant distortion of the MSN lattice, i.e., the interaction between the molecules and MSN monolayer surface is physisorption. We find that all molecules are physisorbed on the MSM surface with small charge transfer, acting as either charge acceptors or donors. The MSN monolayer is a semiconductor with an indirect band gap of 1.79 eV. Our theoretical estimations reveal that upon adsorption of H2, N2, CO, CO2, NO, H2O, H2S, NH3 and CH4 molecules, the semiconducting character of MSN monolayer is preserved and the band gap value is decreased to ~ 1.5 eV. However, the electronic properties of the MSN monolayer can be significantly altered by adsorption of O2, NO and SO2, and a spin polarization with magnetic moments of 2, 1, 2 μB , respectively, can be introduced. Furthermore, we demonstrate that the band gap and the magnetic moment of adsorbed MSN monolayer can be significantly modulated by the concentration of NO and SO2 molecules. As the concentration of NO2 molecule increases, the magnetic moment increase from 1 μB to 2 and 3 μB . In the case of the SO2 molecule with increasing of concentration, the band gap decreases from 1.2 eV to 1.1 and 0.9 eV. Obviously, our theoretical studies indicate that MSN monolayer-based sensor has a high application potential for O2, NO, NO2 and SO2 detection.