Capnography-based ventilation rate guidance is valuable and widely used by advanced life support during cardiopulmonary resuscitation (CPR). However, there is a high incidence of induced chest compression (CC) oscillations that decreases the reliability of automated ventilation detection. We used 30 out-of-hospital cardiac arrest episodes containing the capnogram and transthoracic impedance signals. The algorithm detects the presence of distorted ventilations in the capnogram. It calculates the artifact envelope during the alveolar plateau and removes the artifact during capnogram baseline, thus obtaining a non-distorted waveform. The goodness of the method was assessed by comparing the performance of a ventilation detection algorithm before and after artifact suppression. From a total of 6387 annotated ventilations, 34% of them were classified as distorted. Global sensitivity and positive predictive value (Se/PPV, %) improved from 77.9/74.0 to 97.0/95.8. Median value of the unsigned error (%) of the estimated ventilation rate decreased from 19.6 to 4.5 and the accuracy for detection of over-ventilation increased with cleaned capnograms. Capnogram-based ventilation guidance during CPR was enhanced after CC artifact suppression. Our method preserved the tracing of CO2 concentration caused by ventilations, allowing other clinical uses of the capnography during resuscitation.