Analysts called the arrests a significant blow to the city's corrupt ways.
"This can be Rio's chance to break definitively with these officers who commit illicit actions," said Rodrigo Pimentel, a security consultant and former leader within an elite group of Brazil's military police. "Police in Rio have been too close to crime."
The shake-up comes amid a campaign by Rio officials to break the grip violent drug gangs have on poor slums that cover huge swaths of the city. Rio is host for the championship matches of the 2014 World Cup and then the 2016 Olympics and has promised to reduce violent crime that at times spills out from shantytowns into posh neighborhoods.
Part of the crackdown involves rooting out corrupt cops. The 30 officers arrested in recent days are accused of selling heavy weapons to gangs, tipping off gangs about police raids, and stealing and selling drugs, money and weapons confiscated by police.
The police chief, Allan Turnowski, announced in a statement that he decided to step down after talking with Rio state's security director, Jose Beltrame.
"I feel certain this is the best decision," said Turnowski, who was in the post for nearly two years.
There was no immediate word on who would replace him.
Turnowski's former deputy, Carlos Antonio Luiz Oliveira, was one of the officers arrested and charged with corruption, theft, and collaboration with drug traffickers.
At a news conference last week, Beltrame had expressed confidence in Turnowski, stressing that the police chief would have been arrested if there were any proof he had committed any wrongdoing.
But the alleged involvement of police leaders as high up as Oliveira in corruption has caused turmoil within the department, and both Beltrame and Turnowski concluded it would be best if the chief resigned, a statement from Beltrame's office said.
Rio's police have often been part of the problem of widespread violence in the city, Pimentel said.
Turnowski is the fourth police chief in five years, he noted. Two of the chiefs were arrested, and now one has stepped down. Oliveira was the first deputy commander to be arrested.
"The enemy now is not only the drug trafficker in the slum - it is also the police officer within the organization that feeds that crime," Pimentel said.
Rio's police are also among the world's deadliest, killing one person for every 23 they arrest, according to a 2009 Human Rights Watch report. In the U.S., that ratio is one killing per 37,000 arrests.
This is Rio's opportunity to eradicate the culture of lawlessness and violence that still exists within certain segments of law enforcement, Pimentel said.
Beltrame is the architect of Rio's new and widely lauded security effort, which includes police takeovers of slums controlled by violent drug gangs.
He has spearheaded an effort to install permanent police forces and provide social services in communities that had long been neglected by the state. About 60 communities have been taken over so far in the program, which has been largely well-received by the public.
Beltrame said the anti-corruption operation against police won't affect the security program.
"Changes within the team will not derail the commitment we have with society to make Rio de Janeiro an increasingly safe place," he said.