Healthy indoor air quality (IAQ) is essential to the productivity and wellbeing of building occupants. In order to study the indoor air quality in residential buildings in Xi'an in the cold climate zone, this study selected seven natural ventilation (NV) and three mechanical ventilation (MV) samples to evaluate the levels of fine particulate matter (PM2.5) and carbon dioxide (CO2) through long-term monitoring. The results showed that it is worth studying the ventilation options in January with the lowest outdoor temperature of −0.78 °C, and the highest PM2.5 pollution of 149 μg/m3. The monthly average operation duration of the MV showed an obvious seasonal distribution, which was consistent with the degree of outdoor pollution. Compared with NV, the short-term operation of MV cannot significantly improve indoor air quality, but better results can be achieved after increasing the operation duration. When outdoor pollution is serious, the mean daily operation duration of MV recommended in this study is greater than 9 h. The probability of excessive CO2 concentration (above 1000 ppm) of MV was 26%, which is higher than that of NV (9%). The CO2 concentration increased with the increase in the MV operation duration, and the indoor CO2 concentration was proportional to the temperature difference between indoor and outdoor. The control and operation of the MV system should consider the influence of PM2.5 and CO2 simultaneously. Long-term operation of the MV system combined with short-term NV may be a ventilation strategy suitable for IAQ control of residential buildings in Xi'an.