Food safety is crucial to the health and life of every individual. Triethylamine and formaldehyde, as key indicators for assessing the freshness of seafood, are increasingly important for food safety. Consequently, this study has developed a dual-gas sensor that is easy to operate and can rapidly detect both formaldehyde and triethylamine. The ZnO-MXene based gas sensors were prepared by a two-step electrostatic adsorption method. Under irradiation with 450 nm LED light, the sensors can detect formaldehyde gas at room temperature. By adjusting the temperature, it is possible to detect 100 ppm triethylamine in the dark at 160 ℃, with a response value of 28.2, which is 5.2 times that of the pure ZnO based sensors. Additionally, it exhibits good selectivity, excellent stability, and reproducibility. This paper also provides a detailed discussion of the sensing mechanism for detecting dual gases. It is significant for the development of dual-gas or multi-gas sensors and has potential applications in food safety testing and addressing complex changes in air environments.