Mexico will spend about US$50m (€47m) to hire lawyers for migrants facing deportation in the United States.
The money will also go to outreach programmes “to promote respect for Mexicans’ rights”.
Foreign Relations Secretary Luis Videgaray says the effort “isn’t about obstructing the enforcement of the law in the United States, or much less oppose law enforcement”.
Mr Videgaray also said Mexico understands “it will be necessary to make some changes” to the North American Free Trade Agreement with the US and Canada.
But he said that Mexico will not accept a return to protectionist import quotas or tariffs.
US President Donald Trump has pledged to re-negotiate Nafta and increase deportations, positions that have caused major frictions with Mexico.