Carbon monoxide (CO) and carbon dioxide (CO2) are products of incomplete combustion and complete combustion, respectively. Time‐resolved knowledge of CO and CO2 exhaust concentrations will aid in improving combustion strategies, control, and efficiency. To achieve online high‐precision simultaneous measurement of CO and CO2, a tunable diode laser absorption spectroscopy‐based sensor is designed and constructed. Two diode lasers with central wavelengths of 2.3 and 2.0 μm are multiplexed in time‐division to cover the absorption spectral lines of CO at 4285.00 cm−1 and CO2 at 4989.96 cm−1, respectively. Wavelength modulation spectroscopy with second harmonic detection normalized by the first harmonic (WMS‐2f/1f) is employed. A software lock‐in amplifier and inversion algorithm are implemented for data processing and concentration acquisition. The entire measurement system is based on the idea of a virtual instrument and is carried out using a high‐speed data acquisition card and a computer. Experimental verification demonstrates that the measurement accuracies of CO and CO2 were 2.47% and 2.56%, respectively, with a time resolution of 20 ms. Dynamic measurement experiments with an alcohol blast burner validate the feasibility of measuring CO and CO2 in actual combustion environments. The developed sensor demonstrates the potential for real‐time and in situ carbon emission measurement for combustion diagnosis.