With the rapid development of global industrialization, industrial production leads to the emission of large quantities of toxic gases and long-term exposure of these gases to the air poses a serious threat to human health and the ecological environment. Therefore, online monitoring of toxic gases is a worthy task. In this work, the structures of pristine cerium oxide (CeO 2 ) and nickeldoped cerium oxide (Ni-CeO 2 ) surfaces are established based on the first-principles, and 12 adsorption structures of NH 3 , CH 4 , SO 2 , H 2 S, CO, C 2 H 4 and gas molecules on the pristine CeO 2 and Ni-CeO 2 surfaces are constructed by geometrical optimization. We investigate the adsorption performance and gas-sensing mechanism of each adsorption system from various aspects, such as adsorption energy, band gap, electron density, density of states, frontier molecular orbital theory, conductivity, sensitivity, recovery time, and work function. The results showed that Ni-CeO 2 significantly improved the adsorption properties of C 2 H 4 (−1.784 eV), H 2 S (−1.036 eV), SO 2 (−1.731 eV), and NH 3 (−1.045 eV). The Ni-CeO 2 /C 2 H 4 system exhibits high response (116.414), high work function (4.45 eV), and fast recovery (74.24 s) as well as strong resistivity changes. Hence, the theoretical simulation experiments in this paper provide theoretical guidance for the development of a highly sensitive, work function type (Ni-CeO 2 ) gas sensor for the detection of the harmful gas C 2 H 4 in the atmosphere.