This paper presents a novel adaptive harmonic detecting algorithm, which has the following good qualities: by using the estimation of square and fourth power of the time-average of error signal to control the updating of the step-size, not only under high signal-to-noise ratio conditions but also low ratio conditions, it can provide a more flexible convergence speed and maladjustment. Simulation using Matlab shows that this algorithm has better tracking effect than the fixed step-size LMS algorithm.