A method and apparatus for measuring endogenous CO concentration in alveolar air, comprising: 1. proposing a method for injecting samples in small amounts, multiple times, intermittently, and establishing a CO concentration relationship between sample gas and gas in a gas chamber after completion of sample injection 2. establishing a "concentration difference/electrical level difference" difference value fitting method, to obtain a fitted standard curve for a difference value between the sample gas and base gas 3. establishing an apparatus capable of measuring both CO and CO2, for measuring a CO concentration difference and a CO2 concentration difference between sample gas and base gas 4. proposing a method for compensating a measurement value for endogenous CO in alveolar air. The problem that the amount of sample gas in a breath test is small, and cannot completely replace the gas originally inside the gas chamber, is solved through the adoption of the method for injecting samples in small amounts, multiple times, intermittently. The difference value fitting method effectively eliminates the effects of electrical level zero drift and residual CO of unknown concentration in cleaning gas. The compensating method can eliminate offsets caused by the temperature and pressure at the time of measurement being different from the temperature and pressure at the time of calibration or by air from the surroundings being mixed into sample gas.