Excessive torque and drag in the wellbore can result in the buckling and the failure of the drillstring. Accurate predicting torque and drag is important in drilling operations. Due to the nature of the drilling, determination of torque and drag is a dynamic problem. A multibody dynamic model of the drillstring for the torque and drag analysis is developed here. Unlike traditional softstring models and stiffstring models, the developed model relaxes the assumption of continuous contact between the drillstring and the wellbore. Moreover, this model can account for overall rigid motion, three-dimensional (3D) rotation and large deformation of the drillstring with large-scale slenderness ratio and random contact between the drillstring and the wellbore. The effects of local protuberant components of the drillstring, such as the drillpipe subs and the stabilizers are also incorporated in the current model, which are not considered in most of existing models. Numerical analysis with three cases is carried out to show the application of the developed model in predicting torque and drag in the wellbore.