General Terrence O'Shaughnessy, the head of US Northern Command, said 800 US troops were already on the way to the Texas border and that the remainder of the troops would be at the southwest border by the end of the week. He said troops would focus first on Texas, followed by Arizona and then California.
"That is just the start of this operation. We will continue to adjust the number and inform you of those," O'Shaughnessy told reporters.
The announcement comes amid accusations that US President Donald Trump was trying to focus on the Central American migrant caravan for political advantage ahead of the midterm elections on November 6.
Earlier in the day, Trump labelled the caravan's effort an "invasion" and declared that the migrants would find the US military waiting for them.
More troops than initially forecast
A caravan of Central American migrants, estimated to number between 3,500 and 7,000, who left their countries in mid-October are now in southern Mexico. Most are from Honduras, seeking to escape poverty, violence and government corruption afflicting their nation.
Both Honduras and El Salvador have been plagued by rampant violence, while a lack of jobs has driven many Guatemalans to flee their country.
There are already 2,100 National Guard troops at the border, sent after a previous Trump request in April.
The figure of 5,200 troops is far higher than the 800 to 1,000 initially forecast and more than double the 2,000 who are in Syria fighting the "Islamic State" militant group.
The troops are expected to perform a wide variety of functions such as building tents and barricades and transporting supplies for the Border Patrol, and not be involved in policing the border, officials said.
The US military is prohibited from carrying out civilian law enforcement on US soil unless specifically authorized by Congress. The president is authorized under some specific statutes to deploy soldiers for riot control or relief efforts after natural disasters.