In this study, an adaptive feed-forward cancellation (AFC) with frequency estimation algorithm has been developed to compensate for periodic disturbance at an arbitrary frequency. Conventional AFC was developed to compensate for periodic disturbance at a fixed frequency and cannot compensate for the disturbance in which the frequency varies in real-time. The proposed method can estimate the frequency of the disturbance in real-time by using the input and output signals of the AFC. It can compensate for the periodic disturbance at an arbitrary frequency. In addition, the stability of the feedback control system with the proposed AFC can be optimized at any frequency based on the vector locus of the open-loop characteristic on the Nyquist diagram. The effectiveness of the proposed AFC was confirmed in experiments compensating for whirling vibration, whose frequency varies in real-time in rotating machinery. The proposed AFC can estimate the frequency of the disturbance automatically and compensate for this adequately.