In this paper, a unified rock bolt model is proposed and incorporated into the two-dimensional discontinuous deformation analysis. In the model, the bolt shank is discretized into a finite number of (modified) Euler–Bernoulli beam elements with the degrees of freedom represented at the end nodes, while the face plate is treated as solid blocks. The rock mass and the bolt shank deform independently, but interact with each other through a few anchored points. The interactions between the rock mass and the face plate are handled via general contact algorithm. Different types of rock bolts (e.g., Expansion Shell, fully grouted rebar, Split Set, cone bolt, Roofex, Garford and D-bolt) can be realized by specifying the corresponding constitutive model for the tangential behavior of the anchored points. Four failure modes, namely tensile failure and shear failure of the bolt shank, debonding along the bolt/rock interface and loss of the face plate, are available in the analysis procedure. The performance of a typical conventional rock bolt (fully grouted rebar) and a typical energy-absorbing rock bolt (D-bolt) under the scenarios of suspending loosened blocks and rock dilation is investigated using the proposed model. The reliability of the proposed model is verified by comparing the simulation results with theoretical predictions and experimental observations. The proposed model could be used to reveal the mechanism of each type of rock bolt in realistic scenarios and to provide a numerical way for presenting the detailed profile about the behavior of bolts, in particular at intermediate loading stages.