Baseline wander (BW) and electrocardiogram (ECG) noise reduction play an important role in ECG data analysis and disease diagnosis. This article introduces a sparse optimization method, which takes into account the group sparse characteristics of the signal, and combines low-pass filter to denoise the ECG signal and estimate the baseline. Derived from the classic total variation (TV) denoising method, a denoising method considering the structural characteristics of ECG signals is proposed. This method uses a band matrix to represent the sparse optimization problem, and adopts majorization-minimization (MM) algorithm to optimize the solution of the convergence problem. Through data comparison and detailed analysis, we first compares the method with two TV denoising methods. Then, the proposed method is validated in the MIT-BIH arrhythmia database of ECG signals, and compared with nonlocal means (NLM) and complete ensemble empirical mode decomposition with adaptive noise (CEEMDAN) methods. The simulation experiment results show that the proposed algorithm has lower root mean square error (RMSE) and higher signal-to-noise ratio improvement (SNR_imp).