Mr Ojha had angered Rashtriya Janata Dal chief Laloo Prasad Yadav and the political establishment by speaking his mind.
On Thursday, the Indian Express reported Mr Ojha as having said the murder of Satyendra Dubey, the NHAI engineer who had approached the PMO alleging corruption in the GQ project in Bihar, highlighted how big development projects in the state had become a playground for criminals and mafia. He said, Dubey was known as an efficient and quality conscious officer and this must have annoyed the mafia.
Mr Ojha, a 1967 batch IPS officer whose removal had been demanded by ministers and some of his own subordinates in the police force, said the government action was a fallout of his sustained campaign to break nexus between politicians, bureaucrats and criminals in the state and he would place all facts before the Supreme Court.
Mr WH Khan, who was DGP (civil defence), has been appointed as the new DGP. Accusing the government of being biased and non co-operative in dealing with the law and order situation in the state, Mr Ojha announced his resignation saying, government has the right to remove me...I have the right not to work under this government. I will not work under this government even for a second.
Commenting on Mr Ojhas removal, RJD chief Laloo Yadav said, we have tolerated him for very long. The DGP had violated the service code by his remarks against the politicians and never paid heed to chief minister Rabri Devis advice not to do so.
Asked whether he was removed because the government wanted to shield jailed RJD MP Mohammed Shahabuddin, Mr Ojha said, I do not know about that, but it is one of the principal reasons.
Mr Ojha said he had submitted a report on the criminal and anti-national activities of Mr Shahabuddin on Friday and that was the last straw on the camels back.
The DGP, who received an official order of his transfer as director general (civil defence) said, due to technical difficulties he had not sent his resignation letter and during the one month notice period he would go on leave.
The DGP was the eye of the storm ever since he ordered arrest of controversial RJD MP from Siwan, Mr Shahabuddin, a couple of months back.
Mr Ojha said he was ready to face an inquiry and that he stood by every word he had stated against politicians.
Those who are behind my removal may think this is a victory for them but I do not think that way, he said.
On Monday Laloo had reprimanded Mr Ojha for his public statements asking him not to cross his limits after the DGP at a gathering at Sonepur had said that power in Bihar had gone into the hands of lafange politicians (hoodlum politicians).
Sources close to the chief minister said Rabri Devi and and the RJD chief decided to remove Mr Ojha under pressure from the cabinet colleagues.
Meanwhile, opposition leader in Bihar Assembly SK Modi criticised the Rabri government for removing Mr Ojha and alleged that Mr Khan was appointed new DGP of the state under pressure from Mr Shahabuddin.