The interaction between a heated carbon-based material and high-temperature air may produce ablation gas species such as CO2, affecting heat transfer onto the surface of a thermal protection system. The prediction of ablation gas production is critical for heat flux prediction and the design of a thermal protection system. In this study, we present a system that measures the number density of CO2 formed by the gas-surface interaction between a hot carbon surface and high-temperature gas. The heated carbon wall is exposed to high-temperature air by using a shock tube and surface heating model. The surface temperature of the carbon wall is measured using two-color ratio pyrometry. The number density of CO2 is predicted by performing numerical calculations for the shock tube flow with gas-surface interaction modeling. The number density of CO2 molecules is measured using infrared emission spectroscopy. The measured CO2 number density is 9.60 × 1023 m-3 at an area-weighted average surface temperature of 1212 K. The measured number density matches the predicted value within an error of 6%. The proposed system is applicable for CO2 number density measurement under various gas-surface interaction conditions, and it can be used for the investigation of ablative gas production and numerical research on gas-surface interactions.