During the operation of the magnetic bearing , there is an unbalanced component in the displacement signal at the same frequency as the rotational speed, which produces the displacement stiffness force of the same frequency of speed to affect the performance of the control system, so it is necessary to suppress the magnetic bearing displacement stiffness force. Due to the influence of displacement sensor runout and the nonlinear characteristics of magnetic bearings, there is also a speed multiplication component in the displacement signal, and in view of the above problems, a feed-forward compensation method for magnetic bearing displacement stiffness force considering harmonic disturbance is proposed, and the speed multiplication component in the displacement signal is suppressed by a second-order generalized integrator with feedback coefficient in series, and the displacement stiffness force is compensated in real time by the feed-forward compensation method. The simulation results show that this method can effectively reduce the influence of the harmonic disturbance on the displacement stiffness compensation in the displacement signal, and effectively improve the compensation accuracy of the displacement stiffness force.