The suspect -- identified by police on Monday as 33-year-old Sebastian Zapeta -- was taken into custody hours after the incident.
"The depravity of this horrific crime is beyond comprehension, and my office is committed to bringing the perpetrator to justice," Brooklyn District Attorney Eric Gonzalez said in a statement. "This gruesome and senseless act of violence against a vulnerable woman will be met with the most serious consequences."
The woman was believed to be asleep on a stationary F train at the Coney Island-Stillwell Avenue station in Brooklyn at about 7:30 a.m. on Sunday when a man "approached and lit the victim on fire," police said.
Police said they do not believe the two knew each other, and they did not interact prior to the incident. The man allegedly used a lighter to set the victim's clothing on fire.
The suspect then left the subway car, police said.
Zapeta is also charged with second-degree murder and first-degree arson, according to police. He is likely to make his first court appearance on Tuesday.
He last lived in a homeless shelter in East New York, Brooklyn, sources said.
The suspect is an undocumented immigrant from Guatemala, according to an Immigration and Customs Enforcement spokesperson.
He was initially removed from the U.S. back to Guatemala in June 2018 after U.S. Border Patrol encountered him in Sonoita, Arizona, the spokesperson said. He unlawfully reentered the U.S. at an unknown time and location, the spokesperson said.
The victim in Sunday's subway homicide has not yet been identified.
Police smelled smoke and went to the train to investigate, where they found the woman standing inside the car "fully engulfed in flames."
She was pronounced dead at the scene.
Images of the suspect were captured on officers' body cameras, as that person stayed on the scene after the incident, sitting on a nearby bench.
Those images were released as police requested the public's assistance in identifying the man.
Three high school students recognized him and contacted police, New York Police Department Commissioner Jessica Tisch said in a press conference Sunday evening.
"New Yorkers came through again," Tisch said.
The suspect was taken into custody in a subway car at Herald Square Sunday evening, and police said he was found with a lighter in his pocket.
ICE's Enforcement and Removal Operations will lodge an immigration detainer with the NYPD location where Zapeta is being held, the ICE spokesperson said.