A buckling mechanics model of the drill string is presented considering the friction and the boundary constraints of the drill string. The differential equation of the nonlinear buckling behavior is established by means of the differential quadrature method (DQ method), in which the variation of the friction coefficient from 0 to 0.6 and the buckling displacement under the four boundary constraints SS-SS, SS-C, C-SS, and C-C are considered. It is demonstrated by simulation results the constraints SS-C should be adopted to ease the buckling problems, and the C-SS should be avoided, which provide an effective method of optimization calculation for the drilling and workover operations.