Mr Justice Dyson declared the jail terms imposed on Raymond Massey and Gordon Mudryj in August 1992 'unlawful or alternatively unreasonable'.
Newcastle Under Lyme magistrates had failed to consider other alternatives before imposing immediate jail terms, he ruled.
The men's counsel, Mr Ian Wise, had told the court that these were not the only two Poll Tax cases in which Newcastle Under Lyme magistrates had exceeded their powers.
'Accordingly it seems to me that it is desirable in the public interest that a declaration should be made making it quite clear that what was done here was unreasonable.' The judge made a similar declaration in the case of Mr Mudryj.
Of Mr Massey's case the judge observed: 'I am quite satisfied that on the material which has been put before me that the justices were unreasonable in committing him to an immediate term of imprisonment on the facts of this case.
'I am quite satisfied that they failed to have regard to the purpose of the legislation by failing to consider the alternative of deducting arrears from his Income Support.
Both men's prison sentences were quashed by the judge who ordered the magistrates to pay the action's legal costs.