Lawyers for David Crompton claimed there was no "fair or reasonable basis" for taking the draconian step of forcing him out of office in South Yorkshire.
Mr Crompton attacked a decision taken by Dr Alan Billings, the region's police and crime commissioner (PCC), in the wake of April 2016 inquest findings into the deaths resulting from the Hillsborough stadium disaster 27 years before.
Lady Justice Sharp and Mr Justice Garnham, sitting in London, ruled in Mr Crompton's favour on Friday.
The judges quashed a number of decisions made by the commissioner.
They ruled that the "final decision to require the chief constable's resignation was wholly disproportionate".
A jury concluded that police conduct contributed to or caused the deaths of 96 football fans.
The day after the findings were delivered, the PCC decided to invoke a procedure under which Mr Crompton was suspended and ultimately required to resign that September.
During the High Court proceedings in March, Hugh Davies QC said Mr Crompton, who had intended to go in November 2016 after 30 years of distinguished service, was not involved in his force's underlying failures at Hillsborough or its response to the disaster.
Nor was he implicated in any of the jury's adverse findings, he told the judges.
As chief constable in 2012, he made a public apology on behalf of the force following the findings of the Hillsborough Independent Panel.
Counsel said the PCC decided to require his resignation, not because of any alleged wrongdoing associated with the underlying events, but because of a press release he issued in response to a question raised by then shadow home secretary Andy Burnham.
Mr Davies said the PCC's assessment was that this press release constituted a "serious misjudgment" which had "damaged trust and confidence" in South Yorkshire Police.
Asking the court to quash the decision, he said: "The claimant submits that the defendant had no fair or reasonable basis for taking the draconian step of forcing him out of office, and that the decision was unlawful."
Jonathan Swift QC, for the PCC, had argued that the claim should be dismissed as it was bad on its merits and challenged matters which had been entirely overtaken by the September 2016 decision calling upon Mr Crompton to resign.
He said that, although that decision was plainly controversial, the assessment fell squarely within the discretion and responsibility available to the PCC as the person with the electoral mandate to hold the chief constable to account for his actions.
The PCC was entitled to conclude that public trust and confidence in the chief constable had been damaged by his actions, he submitted.