A new buckling equation in horizontal wells is derived on the basis of the general bending and twisting theory of rods. The boundary conditions of a long tubular string are divided into two categories: the sum of the virtual work of bending moment and shear force at the ends of tubular strings is equal to zero, and the sum of the virtual work of bending moment and shear force at the ends is not equal to zero. Buckling solutions under different boundary conditions are obtained by solving the new buckling model. For the boundary conditions of the first category, the buckling solutions are identical with previous results. For the boundary conditions of the second category, the buckling solutions are different from the results under the boundary conditions of the first category. The results indicate that buckling behaviors depend on both the axial force and the boundary conditions. Compared with previous results, buckling solutions of the new model provide a more comprehensive description of tubular-buckling behaviors.