"We are pleased that the reigning African champions will have such a high-quality final preparation for the important games that we have in the month of June," said Nigeria Football Federation (NFF) general secretary Musa Amadu.
The last time the two countries met was in another friendly in Chihuahua, Mexico in October 2007. The game ended in a 2-2 draw.
The Super Eagles, currently top of their 2014 FIFA World Cup Brazil™ qualifying group, take on Kenya's Harambee Stars in Nairobi on 8 June before travelling to the FIFA Confederations Cup in Brazil.
In Brazil, they play against Tahiti, Uruguay and world and European champions Spain, while the Mexicans clash with hosts Brazil, Italy and Japan.