The electrocardiogram (ECG) signal can easily be affected by various types of noises while being recorded, which decreases the accuracy of subsequent diagnosis. Therefore, the efficient denoising of ECG signals has become an important research topic. In the paper, we proposed an efficient ECG denoising approach based on empirical mode decomposition (EMD), sample entropy, and improved threshold function. This method can better remove the noise of ECG signals and provide better diagnosis service for the computer-based automatic medical system. The proposed work includes three stages of analysis: (1) EMD is used to decompose the signal into finite intrinsic mode functions (IMFs), and according to the sample entropy of each order of IMF following EMD, the order of IMFs denoised is determined; (2) the new threshold function is adopted to denoise these IMFs after the order of IMFs denoised is determined; and (3) the signal is reconstructed and smoothed. The proposed method solves the shortcoming of discarding the first-order IMF directly in traditional EMD denoising and proposes a new threshold denoising function to improve the traditional soft and hard threshold functions. We further conduct simulation experiments of ECG signals from the MIT-BIH database, in which three types of noise are simulated: white Gaussian noise, electromyogram (EMG), and power line interference. The experimental results show that the proposed method is robust to a variety of noise types. Moreover, we analyze the effectiveness of the proposed method under different input SNR with reference to improving SNR (
SNR
imp
) and mean square error (
MSE
), then compare the denoising algorithm proposed in this paper with previous ECG signal denoising techniques. The results demonstrate that the proposed method has a higher
SNR
imp
and a lower
MSE
. Qualitative and quantitative studies demonstrate that the proposed algorithm is a good ECG signal denoising method.