President Luiz Inacio Lula da Silva issued the order after receiving a request on Wednesday from Sergio Cabral, the state governor of Rio de Janeiro, asking for military police support and the army, navy and air force.
"Both requests were attended," a presidential spokeswoman said.
The defence minister and the head of Brazil's national security cabinet are still deciding how many soldiers will be deployed, when they will go and how long they will stay, she said.
Cabral, a Lula ally who was sworn in as state governor on Monday, has said the national military police will initially he initially help to patrol state borders while armed forces will patrol areas near their barracks.
History of violence
Rio de Janeiro, an important tourist and business centre, suffered a wave of gang violence last week in which seven people were burned alive on a bus and two policemen were shot dead.
Lula called the attacks "terrorism" that should be handled by the Brazilian state.
The city has calmed, but scattered episodes of violence have continued. Before dawn on Thursday, a van filled with tourists was stopped by armed men on the motorway and everyone inside was robbed.
Rio will host a summit of presidents from South America's Mercosur trade bloc later this month. It will hold its carnival parade at the height of the tourist season in February and also the Pan American Games in July.
In 2003, about 3,000 federal troops were sent in to maintain order during Rio's carnival after drug gangs torched buses, killed seven police officers and forced shops to close.