The two were held on the basis of descriptions given by witnesses but deny any part in the deaths.
Some teenagers and a child were among those who died in a seemingly random shooting in Queimados and Nova Iguacu.
Officials said the shootings could have been a reprisal for the arrests of eight police officers.
Brazilian President Luiz Inacio Lula da Silva has vowed to punish those responsible for Thursday’s attack.
Police are still looking for at least two other men.