According to a study from Pew Research, between 2005 and 2010 more people moved from the U.S. to Mexico than the other way around. The chart below is from Pew.
This reverses a long term trend of large numbers of legal and undocumented Mexicans moving to the U.S.
In fact, 30% of all immigrants currently living in the U.S. are from Mexico. Also, 58% of the estimated 11.2 million illegal U.S. immigrants are from Mexico.
So what has caused this shift? The Pew study says:
The standstill appears to be the result of many factors, including the weakened U.S. job and housing construction markets, heightened border enforcement, a rise in deportations, the growing dangers associated with illegal border crossings and the long-term decline in Mexico's birth rates.
An article from the Guardian blames growing hostility towards illegal aliens. Key quote from their article:
Potential migrants say the border is not itself a dissuading factor, but racial discrimination and hostility, efforts to deny employment, education and healthcare are, as is increased exposure to arrest and deportation.
While some observers think illegal immigraion will pick up again as the U.S. economy improves, we don't think so. Barring major economic or political problems in Mexico, the changes outlined above have shifted the risk-return ratio away from illegal migration to the U.S.