Buildings play a crucial role in ensuring power grid stability by providing energy flexibility. Existing research mainly improves the building energy flexibility through energy storage, but requires additional equipment costs. This study proposes a new source of building energy flexibility by properly managing indoor air quality with intermittent demand-controlled ventilation (iDCV), which requires no additional equipment investment. This study reveals the mechanisms of enhancing energy flexibility and develops a nonlinear programming algorithm to optimize the dynamic operation of the iDCV. The robustness of the proposed iDCV in enhancing energy flexibility is verified under different application scenarios in different climate zones. The results show that compared with the existing method, the proposed iDCV enhances the energy flexibility with a peak load reduction of 17.1 %–36.1 % under the scenario of constant electricity price and with a flexibility factor enhancement of 9.5 %–80.8 % under the scenario of time-of-use electricity price. Besides the benefit to the power grid with the enhanced energy flexibility, the proposed iDCV also delivers benefits to building users with energy savings of 19.6 %–22.0 % and cost savings of 21.5 %–26.1 %. Therefore, the proposed iDCV provides dual benefits for both the power grid and building users and contributes to developing energy-flexible, low-carbon, and healthy buildings.