There were still people trapped inside the train but it was unclear if they were alive, said Mayor Claudia Sheinbaum.
She added that some minors were among those killed.
The accident happened at 10.30pm local time (4.30am UK time) on the metro’s Line 12 – the construction of which has been plagued with complaints and accusations of irregularities.
The mayor said a support beam had given way as the train passed over it.
Rescue efforts were paused at around midnight as a crane was brought in to stabilise the partially hanging train amid fears it could fall further onto the road.
Friends and relatives of people believed to be involved gathered at the scene near Olivos station, in the southern borough of Tlahuac.
Oscar Lopez, 26, was hoping for news of his friend, Adriana Salas, who is six months pregnant and was on the subway after a day at work.
He said there had been no answer from her since the time of the incident.
“We lost contact with her, at 10.50 pm, there was literally no more contact,” Mr Lopez said.
Foreign minister Marcelo Ebrard – the city’s mayor when the metro line was built – tweeted: “What has happened on the metro today is a terrible tragedy.”
He added: “Of course the causes should be investigated and those responsible should be identified.
“I repeat that I am entirely at the disposition of authorities to contribute in whatever way is necessary.”