The electrocardiogram (ECG) signal is commonly interfered by noises of baseline drift, power frequency, and electromyography, which happens during collections. To improve the signal noise ratio of ECG signals, a threshold function was proposed in the denoising process of the wavelet threshold denoising method, which combining the stationary wavelet transform. And the function is different from the usual one. The new function is verified by analyzing the measured data, it shows that the noises which is introduced in the ECG signal by the baseline drift, power frequency, and electromyography, are removed more effectively, and also the characteristics of the original ECG signal are kept better.