The council accused Andrew Ball of breaching planning laws when he sectioned off part a field near his home and carried out extensive work on the land, inclulding building a tarmac tennis court.
In December 1997 the council issued an enforcement notice requiring him to remove all trace of the tennis court and return his garden to its former state as an agricultural field.
Mr Ball appealed to an DETR planning inspector, but that was dismissed in September last year.
The judge's ruling means the future of Mr Ball's garden and tennis court will have to be considered afresh by the DETR.
Judge McLeod said that, due to a procedural error, Mr Ball had not had the opportunity to comment on some of the points made by Kirklees before the inspector published his decision.
Although that amounted to 'unfairness in the ordinary sense of the word', the judge said the procedural error had caused Mr Ball no 'substantial prejudice' and dismissed his appeal on that ground.
But Judge McLeod said he had also been 'given some concern' by the inspector's handling of Mr Ball's claim that the enforcement notice had been issued against him too late.
Mr Ball had claimed immunity for his tennis court on the basis that it had been laid down more than four years before the enforcement notice was issued.
The judge accepted that the inspector had rejected Mr Ball's arguments on that point by closely following an earlier planning decision on which Mr Ball had had no opportunity to comment.
Mr Ball, who was not in court, had his planning appeal allowed and the inspector's decision was quashed.