Mr Pandey stepped down a month before his tenure was to end.
The officer's appointment as police chief last year, even though he is out on bail, was challenged in the Supreme Court by a predecessor, Julio Ribeiro.
Mr Ribeiro had argued that a state police force cannot be headed by a person accused of murdering four persons, especially when the trial is yet to begin. Mr Pandey has been charged along with others with conspiracy, illegal confinement and murder in the Ishrat Jehan case by the Central Bureau of Investigation or CBI. He is out on bail.
The top court had hinted at removing him but the state government yesterday told the court that Mr Pandey had decided to step down.
Geetha Johri, 60, was also an accused in the Sohrabudin Sheikh fake encounter killing but charges against her were later dropped by a court.
While appointing Mr Pandey to the top post last April, the state government had said he would only hold additional charge. But he was given an extension after his tenure ended this January and he was due to retire on April 30. The Gujarat government told the court today that it wanted to extend Mr Pandey's tenure for six months, but the union Ministry of Home Affairs had allowed only a three-month extension.
Ms Johri retires at the end of the year, when assembly polls are due in Gujarat.
19-year-old Ishrat Jahan and three others were killed in an alleged fake encounter in Gujarat in June 2004. The Gujarat Police said they were Lashkar terrorists and were in Gujarat to assassinate the then Chief Minister Narendra Modi.