The greenhouse effect resulting from fuel combustion has drawn growing attention, and CO2 emissions from fossil fuel power stations are one of the main sources of greenhouse gases. It is crucial to monitor the concentration of CO2 in the flue gas ducts of these stations. However, pressure and vibration caused by the combustion of boilers make the measurement of CO2 in flue gas ducts extremely challenging. In this study, tunable diode laser absorption spectroscopy (TDLAS) combined with Wave Modulation Spectroscopy (WMS) was employed to measure the concentration of CO2 under different pressure and vibration conditions in the laboratory. The absorption line of CO2 at the wavenumber 6357.38 cm−1 was recorded under varying pressure conditions ranging from 0 to 1.4 atm, acceleration conditions ranging from 0 to 7.7 m/s2, and a combination of both. Firstly, a negative linear correlation was found between the pressure and the amplitude of the second harmonic, with a maximum relative error of 4.645% observed at a pressure of 1.4 atm. Secondly, the maximum acceleration that the system can withstand was determined to be 7.3 m/s2, as it was not possible to provide a sufficiently low fitting error at higher accelerations. For the combined effects of the pressure and vibration, a dramatic increase in the relative error of amplitude can be observed within the acceleration range of 5.0~6.0 m/s2 while under the pressure conditions of 0.6 atm, 1.0 atm, and 1.4 atm. Moreover, the maximum endurable acceleration decreases with the increase in pressure, which infers that effective measurements can be achieved when the acceleration is below 5 m/s2 within the pressure range of 0~1.4 atm. This suggests that TDLAS combined with WMS possesses a potential for online measuring of CO2 concentrations in flue gas ducts within a certain acceleration range. This work can provide some insights for stable gas detection using TDLAS under varied pressure and vibration conditions.