The principle of wavelet denoising and the rule of optimizing threshold function are studied, aiming at the problem that local oscillation and edge blur of signal after wavelet soft and hard threshold function denoising lead to poor denoising effect. An adjustable threshold function with continuity, flexibility and small constant deviation is designed. A wavelet denoising algorithm based on improved threshold function is proposed, which is applied to denoising signals containing Gaussian white noise. Experimental results show that compared with traditional methods, the proposed method has flexibility and applicability to simulated signals and ECG signals, and the signal-to-noise ratio of the signal after denoising is improved by 16. 21%, and the Pearson correlation coefficient is increased by 1. 62%. Therefore, the algorithm is feasible, which can effectively retain feature information, and the denoising effect is more ideal.