The decision came after the governor of Rio de Janeiro state, Sergio Cabral, asked President Dilma Rousseff for government support ahead of the football World Cup in June.
On Thursday, three police bases in the city were attacked by suspected gangs.
Four police officers have been killed since February in similar attacks.
The attacks on police in Brazil's second largest city have heightened concerns about law and order ahead of the World Cup, which begins on 12 June. Seven World Cup matches, including the final, will be played in Rio.
Mr Cabral discussed the violence with President Rousseff in the capital, Brasilia, after Thursday's unrest in the northern Rio favela, or shanty town, of Manguinhos.
Police vehicles were set on fire and the police unit's commander was shot in the leg.
Rio's authorities have been trying to rid the city's favelas of drug dealers.
"It is clear that criminals want to weaken our policy of pacification and take back territories which were in criminal hands for decades," Mr Cabral said ahead of his meeting.
"The state will not back down. The public may be sure we shall act," the governor said.
The authorities in Brasilia did not give say how many federal troops would be sent to Rio or when they would be deployed.
Rio police have installed more than 30 bases in favelas in the past five years to drive out drug gangs.
Correspondents say murders have declined and the number of shootouts has dropped, but residents have often accused the police of using heavy-handed tactics.
The BBC's Julia Carneiro in Rio says the recent deaths among the security forces have prompted some groups to express solidarity with police and their families.
Rio de Janeiro is to host South America's first Olympic Games in 2016 as well as this year's World Cup.
The government in Brazil says it will send federal troops to Rio de Janeiro to help deal with a spate of violent attacks targeting the city's police.