Service was suspended between 96th and 137th streets, with shuttle buses and the A train being the only alternatives for mass transit riders.
The train derailed just before 6 p.m. near the elevated 125th Street subway stop on Broadway. More than 400 people were on board, but no injuries were reported.
The Nos. 2 and 3 trains were running local in both directions between 96th and Chambers streets, and shuttle buses were running passengers from 125th Street to 96th Street. Normal service resumed just after 6:30 a.m.
The cause of the derailment is under investigation. There was damage to both the rail and the electrified third rail, and work continued through the night to fix the tracks.