Cardiac arrest is a fatal and urgent disease in humans. A high‐quality electrocardiogram (ECG) has a positive guide to the success of defibrillation and resuscitation. However, because of artificial motion interference and ambient noise, reliable ECG signals can be obtained only during chest compression (CC) pauses. To address this issue, the adaptive recursive least squares (RLS) denoising approach is proposed. First, the ECG signals of porcine are divided into three groups: CC, without CC, and both with and without CC. Then, five Gaussian noises with different signals‐to‐noise ratios (SNR) and five noises with different distribution types are added, respectively. Furthermore, RLS is compared with six other different denoising approaches. Experimental results demonstrate significant differences between RLS and the other six algorithms in main metrics. SNR and related factors are larger, while the root mean square error is smaller. In conclusion, RLS can significantly eliminate many types of ambient noise, and improve the quality of ECG signals during cardiopulmonary resuscitation.