Baseline wandering is a classical problem in electrocardiogram (ECG) records that generally produces artifactual data when measuring ECG parameters. The authors present a cascade adaptive filter for removing the baseline wander and preserving the low-frequency components of the ECG. This cascade adaptive filter works in two stages. The first stage is an adaptive notch filter at zero frequency. The second stage is an adaptive impulse correlated filter that, using a QRS detector, estimates the ECG signal correlated with the QRS occurrence. In this way, all the signal components correlated with the QRS complex are preserved. The authors analyze the frequency response of the filter, showing that the filter can be seen as a comb filter without the DC lobe. The method was applied to ECG signals from the MIT-BIH database and its performance was compared with the cubic spline approach. The method can remove baseline wander in real time without needing to calculate the isoelectric levels, while preserving the low-frequency ECG clinical information.