Early reports suggest a mechanical problem caused the carriage to become detached from the ride and fall some 10 metres to the ground, the public prosecutor said in a statement.
It is believed the two men died as a result of head injuries, it added, while two women were taken to the hospital - one of them in a serious condition.
10 killed, 24 injured in Sanghar road accident
The accident happened at La Feria amusement park in the capital Mexico City on Saturday.
In a Twitter post, the theme park said it "deeply regrets the terrible accident" and it has launched an investigation into the incident.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ