Six people on the train died, as well as the driver of a Jeep Cherokee that got stuck on the tracks and was hit at about 6:30 pm, New York Governor Andrew Cuomo told a news conference after visiting what he said was a devastating scene.
"This is a truly ugly and brutal sight," he told reporters. "The third rail of the track came up from the explosion and went right through the (rail) car, it's a devastatingly ugly situation."
The third rail, which carries 750 volts of direct current, tore through the floor of the first car of the train, charring the carriage and sending billows of smoke into the air. Damage to the other seven cars was minimal.
"It's actually amazing that not more people were hurt on that train," Cuomo said.
Westchester County Executive Rob Astorino told reporters 12 people were injured, 10 of them seriously. Eleven of the injured were taken to Westchester Medical Center, he added.
Passengers described frightening scenes as the train was evacuated.
"The smoke was orange coming off the train, it was still on fire at that point. The front car was billowing heavy smoke out of the windows and doors," said Jared Woodard, an employee of BGC Financial in New York, who was on the train travelling home to Chappaqua.
Hundreds of passengers from the eight-car train were taken to a rock-climbing gym for shelter, authorities said. The average number of passengers on the train is 650 on a line that carries commuters through affluent New York City suburbs such as Westchester County, one of the richest in the United States.
Media reports said the driver of the car got out briefly to try to push it off the tracks, then got back in before it was hit by the train. Officials did not say why the car was stalled on the tracks.
The train left Grand Central Terminal in midtown Manhattan at 5:44 p.m. and was headed north to Wassaic in southeast New York state.
Parts of the train line would stay closed on Wednesday morning, said the Metropolitan Transportation Authority (MTA), which was arranging for shuttle buses to fill the gap and warned of crowds and delays for thousands of commuters.
Westchester County is home to many bankers and corporate lawyers, boasts a median household income of roughly $82,000, and houses the headquarters of major companies, including IBM and PepsiCo Inc.
The Harlem Line is part of the Metro-North Railroad commuter rail service, which runs five lines.
Other Metro-North trains have been involved in accidents in recent years.
One derailed near the northern edge of New York city on Dec. 1, 2013, killing four and injuring 70. It was traveling nearly three times over the speed limit for the section of track where it crashed, investigators said.
Astorino made a distinction between that crash, which was the result of a train employee error, and Tuesday's accident. But he said the latest incident was still under investigation.
Earlier that year two Metro-North passenger trains collided between Fairfield and Bridgeport, Connecticut, injuring more than 70 people and halting services.