Victoria state's Assistant Commissioner Brett Guerin, who was also an ethics chief, resigned late Monday after an explosive report in Melbourne's The Age newspaper detailing numerous YouTube posts written under his alleged online pseudonym "Vernon Demerest".
"It is behaviour that is completely and utterly unacceptable at Victoria Police," Victoria Police Chief Commissioner Graham Ashton told reporters.
"There are a lot of shocked people ... It's completely out of character with what we know the assistant commissioner has been doing."
"Demerest", the name of the character played by actor Dean Martin in the 1970 movie "Airport", made racist remarks that included references to "third world dullards" and "Indian and Pakistani peasant (s)", the newspaper reported.
Some alleged posts by Guerin, including for videos about Somali pirates and of Argentina losing to the Netherlands in the 1998 World Cup, are too racially offensive to publish.
"Demerest" also wrote sexually explicit comments about Australian sporting matches, the Age said.
Guerin was already on suspension and being investigated by the police's anti-corruption watchdog after revelations last week that he made vulgar sexual remarks on a website about a former female police commissioner and a police union chief.
"The language I used ... was completely inappropriate, embarrassing and I can understand people saying 'what the hell is this bloke doing?'," Guerin, a policeman for more than four decades, told commercial station 3AW station last week.
"The reason I did it under a fake name is clearly if I had gone in with my own name, it would have been associated with Victoria Police."
Ashton stressed that the scandal was not a reflection of the wider culture among his officers.
"We will be talking to the emerging community, multicultural communities that we have been working with for a long time and making sure that they know it is not representative of the views of Victoria Police," he said.