Expiratory CO2 concentrations can directly reflect human physiological conditions, and their detection is highly important in the treatment and rehabilitation of critically ill patients. Existing respiratory gas analyzers suffer from large sizes and high power consumption due to the limitations of the internal CO2 sensors, which prevent them from being wearable to track active people. The internal and external interference and sensitivity limitations must be overcome to realize wearable respiratory monitoring applications for CO2 sensors. In this work, an ultra-compact CO2 sensor was developed by integrating a microelectromechanical system emitter and thermopile detectors with an optical gas chamber; the power consumption of the light source and ambient temperature of the thermally sensitive devices were reduced by heat transfer control; the time to reach stabilization of the sensor was shortened; the humidity resistance of the sensor was improved by a dual-channel design; the light loss of the sensor was compensated by improving the optical coupling efficiency, which was combined with the amplitude trimming network to equivalently improve the sensitivity of the sensor. The minimum size of the developed sensor was 12 mm × 6 mm × 4 mm, and the reading error was <4% of the reading from −20 °C to 50 °C. The minimum power consumption of the sensor was ~33 mW, and the response time and recovery time were 10 s (@1 Hz), and the sensor had good humidity resistance, stability, and repeatability. These results indicate that the CO2 sensor developed using this strategy has great potential for wearable respiratory monitoring applications.