The drift-tearing mode is nonlinearly simulated, using a reduced set of two-fluid equations and locking of magnetic island rotation by a static error field is investigated. Detailed analysis shows that Maxwell stress and ion viscosity play important roles in the locking process. In the locked state, it is found that contributions of E × B flow and electron diamagnetic flow cancel each other inside a magnetic island. A low dimensional model describing the locking process of a rotating magnetic island is derived, based on nonlinear simulation results. It is clarified that a coupling between trapping by an error field and damping by ion viscosity is essential. The dynamics of a rotating magnetic island is shown to be understood by analogy with the damping process of pendulum motion in a gravity field.