Custom inspectors were told to turn over their badges and weapons to soldiers before leaving their posts at airports and border crossings across the country on Saturday night.
Enrique Torres, a spokesman for the military and federal police in the northern city of Ciudad Juarez, said soldiers were at the border crossing with El Paso, Texas, to help avoid violence during the transition.
Canabal said the previous inspectors were not fired - the government just did not rehire them when their contracts expired.
The move is part of a broader effort to root out corruption and improve vigilance at Mexican ports with new technology.
The new agents have been taught to use new equipment installed at border crossings to scan for hidden contraband and more dogs trained to sniff out drugs and other banned goods are also being added.
The main focus of the overhaul is to combat tax evasion, although Mexico is also trying to seize more guns smuggled in from the US and elsewhere that end up in the hands of deadly drug gangs.
Canabal said the government hopes to improve its tax collection with the new system, noting that more than 40 per cent of Mexico's value-added tax is collected at customs.
However, he said the main benefit will be stopping the flood of pirated and cheap goods that he said undermine Mexican industries.
The new agents, more than 70 per cent of whom are university educated, were chosen in a "strict selection process that included psychological and toxicological checks, as well as the necessary investigations to ensure they have no criminal record", the tax administration said in a statement.
Canabal said the 700 who were replaced – fewer than 10 per cent of whom have university degrees - would not be banned from reapplying for their jobs, but would have to meet the new, stricter requirements.