In this study, density functional theory (DFT) was employed to assess the electronic and structural properties of pristine and O-doped phosphorene nanosheets. The adsorption of acetaldehyde and ethylene oxide was assessed on pristine and O-doped phosphorene monolayers. Acetaldehyde and ethylene oxide exhibit stronger interaction with O-doped rather than pristine phosphorene. The adsorption of acetaldehyde and ethylene oxide on O-doped phosphorene is sufficiently strong to allow a fast recovery time. Moreover, the work function calculations show effective adjustment by selective adsorption of these compounds. Therefore, O-doped phosphorene-based nanomaterials can be used for the detection and sensing.