This paper detailedly illustrates how to design an anti-sway controller of overhead crane for eliminating pendulum of hook-headed. First of all the paper uses Lagrange Equation in analytical mechanics to obtain a mathematical model of crane motion system in three dimensional space. Then the paper advances a new control method and designs an anti-disturbance tracking controller based on servo-compensator and stabilization compensator for eliminating pendulum of hook-headed and accurately fixing position. In general, it is difficult to design an appropriate control law because of the crane motion system’s nonlinearity and strong coupling. However, the control method the paper put forward is simple and effective, and ensures the transient state performance of closed-loop system preferable and stable. The paper will introduce the design steps of anti-sway controller of overhead crane and give a satisfying simulation result, which are new and original in this paper.