At least 19 people were hurt, the Metropolitan Transit Authority said. While most of the injuries were minor, officials said four people were taken to hospitals with "potentially serious" injuries.
The F train, which runs between Brooklyn and Queens by way of Manhattan, was headed into Manhattan when six of the eight cars left the tracks. The derailment occurred near 65th Street and Broadway.
Service was halted on a section of the F line in Queens and on three other lines that share the tunnel in the area. Delays were reported on at least two other lines.
Officials said they hoped to have trains running normally for the evening rush hour.
About 1,000 people were on board the train that derailed. Firefighters and police officers supervised an evacuation through grates into the street.