Electromyogram (EMG) artifacts often contaminate the electrocardiogram (ECG). They are more difficult to suppress or eliminate, compared for example to the power line interference, due to their random character and to the considerable overlapping of the frequency spectra of ECG and EMG signals obtained from the same pair of electrodes. The usually applied low-pass filtering (cutoff frequency of minimum 35 Hz) results in limited suppression of the EMG artifact and considerable reduction of sharp Q, R and S ECG wave amplitudes. A solution to this problem is proposed by applying approximation filtering with dynamically varied number of samples and weighting coefficients, depending on the ECG signal slope. The slope measure used is the absolute value of the product of the tilts of two adjacent 10 ms segments sliding along the signal. The results obtained show a slight widening of some sharper QRS complexes, but a virtual preservation of their amplitudes and a considerable reduction of the EMG artifact.