During the 2008 Wenchuan earthquake, the Miaoziping Bridge experienced an uplift effect at its end spans, resulting in damage to its bearings and pad stones. The influence of uplift and the application of uplift restraint devices for long-span rigid-frame bridges under near-fault conditions have been insufficiently recognized in the past. In this study, we developed a refined finite element model of the Miaoziping Bridge, considering the initial stress state and nonlinear characteristics of the girder. Nonlinear time history analysis was conducted using Wenchuan strong motion records and 40 near-fault ground motions. When the end span is uplifted and in contact with the bearing, a large axial force of the bearing (accompanied by oscillation) is generated, which is approximately 1-11 times the initial axial force of the bearing. There is a weak correlation between uplift displacement and TP/T1 for the rigid frame bridge. The uplift displacement under the ground motion with flingstep effect is greater than that under the ground motion with forward directivity effect. We proposed several uplift-restraint devices for the end spans. Setting the tuned viscous mass damper (TVMD) longitudinally can reduce the uplift displacement and axial force of the bearing to a certain extent, while setting vertical TVMD, cable, or ballast at the end span can completely eliminate the uplift effect. Moreover, because the uplift displacement of the end span was constrained, the negative bending moment of the side span slightly increased. Setting the vertical TVMD or cable, together with longitudinal TVMD, is desirable to fully reduce the tensile force of vertical TVMD or cable. In conclusion, our research highlights the significance of considering uplift and uplift restraint devices for long-span rigid-frame bridges under near-fault conditions. The findings of this study can provide valuable insights into the design and maintenance of such bridges.