The conventional detecting methods for harmonic currents have various limitations. In this paper, according to the adaptive noise canceling technology in the signal processing, an improved adaptive algorithm of detecting harmonic currents is presented. It adopts a new variable step size least mean square(LMS) method allowing more flexible control of misadjustment and convergence time without the need to compromise one for the other. Moreover, the algorithm can effectively adjust the step size while maintaining the immunity against harmonic current disturbance. Meanwhile the additional calculation is very little, so the algorithm presented is easy to implement. The simulation results illustrate that the performance of the proposed approach is satisfactory.