More than 1,000 others are reported to have been infected by the swine flu virus.
At least eight people have been infected by the new virus in Texas and California, raising fears of a pandemic.
Mexican authorities have closed schools and other public buildings, suspended public events and begun a vaccination campaign in an attempt to contain the outbreak.
Mexican health minister Jose Angel Cordova confirmed 20 deaths from swine flu and said authorities were probing another 40 who had died with flu symptoms.
The flu combines genetic material from pigs, birds and humans in a way researchers have not seen before.
The head of the World Health Organisation (WHO), Margaret Chan, has cut short a visit to Washington and returned to the agency's Geneva headquarters to oversee the handling of the outbreak.
The UN health agency says lab tests have confirmed 12 of the Mexican cases are identical to a swine flu virus detected in the US.
It is convening an expert panel to decide whether to raise the pandemic alert level.
"We are very, very concerned," said WHO spokesman Thomas Abraham.
"We have what appears to be a novel virus and it has spread from human to human. It's all hands on deck at the moment."
Mexican authorities have urged people to avoid hospitals unless they have a medical emergency.
They have also said the public should avoid customary greetings such as shaking hands or kissing cheeks.
At Mexico City's international airport, passengers were questioned to try to prevent anyone with flu symptoms from boarding aircraft and spreading the disease.
In a further precaution residents of the capital donned surgical masks and public gathering places were shut down for the first time in 25 years.