A compact difference scheme is proposed to solve a class of fourth-order differential equation with nonlinear boundary condition.Rigorous error analysis of the scheme is carried out.Newton iterative method and difference quotient iterative method are presented to deal with the nonlinear boundary problem respectively.Numerical results show that the approximation scheme is effective and the accuracy of the scheme is of O(h4).