The shoot-out took place during a police operation in a favela in the Jacarezinho area of the city.
Police launched the operation after receiving reports that drug traffickers were recruiting children for their gang.
Two passengers on a metro train were hit by bullets but survived.
Police in the Brazilian city confirmed the death of one of their officers, Inspector Andre Leonardo de Mello Frias. A statement on Facebook said "he honoured the profession he loved and will be missed".
Police Chief Ronaldo Oliveira told Reuters news agency that Thursday's raid was "the largest number of deaths in a police operation in Rio".
According to local news, the gang targeted in this raid engages in drug trafficking, mugging, murders and kidnappings.
Television images showed suspects trying to escape across rooftops as police entered the favela.