Formaldehyde is a volatile organic compound (VOC) with extensive applications, volatility, and toxicity, which have made it an important risk to human health even at low concentrations. Therefore, rapid detection of formaldehyde vapors in the environment is a necessity. Herein, we introduce a resistive gas sensor based on zeolitic imidazolate framework-8/multiwalled carbon nanotube (ZIF-8/MWCNT) for detection of formaldehyde vapors at room temperature. In this sensor, a low amount of MWCNTs was used in order to improve the electrical conductivity of the porous nanoparticles of ZIF-8. The sensor was fabricated by deposition of a thin layer of the nanocomposite onto interdigitated electrodes, and its sensing ability was investigated on exposure to formaldehyde vapors. The obtained sensor showed sensitive and fast responses to different concentrations of formaldehyde, and the sensor response to formaldehyde was higher than toward some other VOCs, including methanol, ethanol, acetone, and acetonitrile. Furthermore, because of the hydrophobic nature of ZIF-8, the effect of relative humidity on the gas-sensing performance was insignificant, which proves that this sensor is suitable for use under humid conditions.