Police said some 500 people showed up on Thursday at the funeral of Luciano Barosa da Silva, nicknamed Lulu, at the Brazilian capital's prestigious Sao Joao Batista cemetery, where celebrities such as actress Carmen Miranda are buried.
Lulu and another gangster died on Wednesday in a shootout with an elite police unit in the Rocinha slum – one of Latin America's largest with a population of 150,000 - where he had run the drug trade since 1995.
Police were still hunting for his adversary, Eduino Eustaquio, or Dudu – the head of a rival group that tried to oust Lulu last week, unleashing a turf war that has so far killed 12 people.
Mourners at Lulu's funeral swore revenge at the rival gang, chanting "Just you wait, Dudu, your time will come."
Some 100 police stood outside the cemetery. Reporters had to leave after the crowd started behaving aggressively.
Brazilian gangs often order slum businesses to close after kingpins die.
"Last night youths came down here and told us all shops have to close because it's mourning for Lulu, and to spread the word," said a baker.
Metal shutters were down on his bakery and nearby shops.
Rio is a major transit point for Columbian cocaine going to Europe and a big market itself for the drug. Rocinha is one of the main drug distribution spots in Rio.