By using density functional theory (DFT), the adsorption behavior of gas molecules on defective graphene doped with manganese and nitrogen were investigated. The geometric structure, electronic structure, and magnetic properties of two substrates were calculated and the sensing mechanism was also analyzed. The results indicate that the MnSV-GP and MnN3-GP have stronger structural stability, in which Mn atoms and their coordination atoms will become the adsorption point for five gas molecules (CH2O, CO, N2O, SO2, and NH3), respectively. Moreover, at room temperature (298 K), the recovery time of the MnSV-GP sensor for N2O gas molecules is approximately 1.1 s. Therefore, it can be concluded that the MnSV-GP matrix as a magnetic gas sensor has a promising potential for detecting N2O. These results also provide a new pathway for the potential application of Mn-doped graphene in the field of gas sensors.