Using first-principles calculations, the structural, electronic, and optical properties of CO2, CO, N2O, CH4, H2, N2, O2, NH3, acetone, and ethanol molecules adsorbed on a diazine monolayer were studied to develop the application potential of the diazine monolayer as a room-temperature gas sensor for detecting acetone, ethanol, and NH3. We found that these molecules are all physically adsorbed on the diazine monolayer with weak adsorption strength and charge transfer between the molecules and the monolayer, but the physisorption of only NH3, acetone, and ethanol remarkably modified the electronic properties of the diazine monolayer, especially for the obvious change in electric conductivity, showing that the diazine monolayer is highly sensitive to acetone, NH3, and ethanol. Further, the adsorption of NH3, acetone, and ethanol molecules remarkably modifies, in varying degrees, the optical properties of the diazine monolayer, such as work function, absorption coefficient, and the reflectivity, whereas adsorption of other molecules has infinitesimal influence. The different adsorption behaviors and influences of the electronic and optical properties of molecules on the monolayer show that the diazine monolayer has high selectivity to NH3, acetone, and ethanol. The recovery time of NH3, acetone, and ethanol molecules is, respectively, 1.2 μs, 7.7 μs, and 0.11 ms at 300 K. Thus, the diazine monolayer has a high application potential as a room-temperature acetone, ethanol, and NH3 sensor with high performance (high selectivity and sensitivity, and rapid recovery time).