A woman who was hit by a stray bullet was also taken to hospital, reports say.
"It was a success. With today's operation we have considerably weakened the criminals," said the head of civil police, Gilberto Ribeiro.
Police often stay out of Rio's large shanty towns, only entering on heavily armed raids directed against drug gangs or illegal militias, says the BBC's Gary Duffy in Rio de Janeiro.
However a new approach to policing is being tried in two poor neighbourhoods, one of which was visited by Brazil's President Luiz Inacio Lula da Silva on Tuesday.
Police are maintaining a 24-hour presence in the shanty town of Santa Marta to try to reclaim the area from drugs gangs.
Analysts say the experiment might offer at least a limited alternative for policing in city.
However there are more than 900 shanty towns and the costs and challenges of ensuring all are properly policed would be enormous, our correspondent says.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.
Bookmark with:
What are these?