During the time you worked in Mexico, 6.5% of your salary was set aside in an individual retirement account. Additionally, your employer contributed the amount equal to 5.0% of your salary every month in a housing fund.
This money belongs to you and has been deposited in a financial account in your name, managed by a Retirement Fund Administrator (AFORE).
According to Mexican Law, that money can only be withdrawn when you turn 60 or older, in case of work disability, or death; as long as you continue to work and reside in Mexico.
However, if you are a foreigner (expat) who permanently leaves Mexico (to return to your home country or elsewhere around the world), and it is your desire to withdraw funds from the AFORE financial account, there is no legal provision that allows or prohibits it.