It seems that some US customs officer told him that it would not be a problem to have the gun in Mexico. The problem is that the word or a US customs officer has no authority in Mexico.
Also, as you enter Mexico there are large signs that say that guns are illegal in Mexico.
His problem now is that the more publicity his case receives in the US, the higher the price will be to get him out of there.
He will most likely grt out of there, but the family is going to have to pay a large sum of money and/or the US will have to exchange some Mexican criminals held in jail in America.
The one that will not happen is for Mexico to proclaim that US citizens have immunity from prosecution in their county.
Lot of info here -
http://www.huffingtonpost.com/2012/12/12/mexico-jon-hammar-jailed-release_n_2284252.html