Electrocardiogram (ECG) signals often encounter various types of noise interference, which annihilates their waveform characteristics and exhibits strong instability. To facilitate clinical diagnosis and analysis, it is necessary to perform denoising processing in advance. A denoising method for ECG signals based on variational mode decomposition (VMD) and recursive least square (RLS) has been proposed. VMD was used for the modal decomposition of noisy ECG signals, and the recursive least square (RLS) algorithm was used for adaptive filtering of various intrinsic mode functions (IMFs) components. The problem construction, solution, and decomposition characteristics of VMD were analyzed. The IMFs filtered by RLS were reconstructed. This achieved the elimination of interference noise in the ECG signal. The Sym8 wavelet basis, LMS, NLMS, RLS, and VMD-RLS denoising method were compared by using ECG signals including Gaussian white noise, baseband drift, electrode motion, electromyographic interference, and electrical interference noise. The experimental results showed that the VMD-RLS denoising method has significantly better denoising performance than the other four methods, achieving better values in the quantitative evaluation indicators. This algorithm improved convergence speed and signal estimation accuracy, and it has good effectiveness, superiority, and practicality. Therefore, the VMD-RLS denoising method can enable doctors and researchers to analyze and diagnose ECG signals of heart diseases more accurately.