It is important to detect foodborne pathogens in food and water, such as Listeria monocytogenes (L.monocytrogenes), which can cause foodborne illness in people with compromised immune systems. Volatile organic compounds (VOC) and 3‑hydroxy-2-butanone (3H-2B) produced by L.monocytrogenes can be used as biomarkers for indirect detection of microbial contamination. In this study, the mesoporous ZnO@CO3O4 nanosphere was prepared through the simple hydrothermal synthesis method of ZIF-l-Zn@Co, the cage construction of mesoporous ZnO@CO3O4 nanosphere was remained unchanged after the calcination of the ZIF-l-Zn@Co at 600 °C for 2 h in air. The mesoporous ZnO@CO3O4 nanosphere was selected as the gas sensor showed the strongest response to 3H-2B, and 7–12 times higher than the response of other test gases. In addition, compared with ZnO and Co3O4 single metal oxide gas sensor, the ZnO@CO3O4 sensor possessed better repeatability and stability after repeated repeatability tests under the same conditions.