The health secretary was granted more power last year to suspend pension benefits to NHS staff charged with a crime, which the High Court has ruled breaches human rights.
The court said the measure was “wrong in principle and inherently unfair”.
Justice Andrews said it is a “fundamental principle that a person facing such criminal charges is presumed innocent until the prosecution has made a jury sure of their guilt”.
She said: “That principle cannot be displaced or watered down.”
The British Medical Association, which challenged the measure in court, said people can lose their rights to other public sector pension schemes when found guilty, but not before.
The High Court found that when the government amended NHS pension rules in April 2019, it wrongly conflated someone charged with a crime — who may well still be innocent — and someone who had been convicted.
Mr Hancock had pushed ahead with the policy, despite outcry from the BMA.
In April last year, the trade union for doctors warned the proposal “risks unfairly subjecting innocent members to hardship” in the magazine Pulse.
After the ruling, the BMA said: “We are glad that these regulations, which should never have been approved in the first place, will now be struck from the statute book.”
Dr Chaand Nagpaul, the association’s council chair, said: “These rules assume guilt from the outset with little regard for the impact on a doctor’s wellbeing, career or personal life.
“We could not allow the government to simply disregard the fundamental principle that a person charged with a crime is presumed innocent until proven guilty.”
A Department of Health and Social Care spokesperson said: “We are considering the implications of the Court’s judgment.”