Tandridge District Council had tried to prosecute Village Developments and its contractors ATC Arboriculturalists for allegedly ring-barking four oak trees on land earmarked for development in Oxted.
But following an appeal by the two firms, the court ruled that the developer did not have sufficient notice and were not obliged to notify its contractor, effectively blocking the prosecution.
The TPO was first served last March after nearby residents found that the trees, on the green belt land, had been girdled.
Although the council had served the TPO at the addresses of the land's registered owners, the judge ruled it should have been served at the same time on Village Developments, rather than by recorded delivery post.
The council will now have to pay the firms' costs of around £75,000 along with its own legal costs.
A council representative said: "We are very disappointed at the outcome of the hearing. The council will consider its position further once the written judgement is issued."
Describing the case as "a thoroughly nasty episode", Village Developments managing director Nigel Greenhalgh said: "It seems to have come about because councillors put pressure on officers to placate a group of residents opposing our development plans.
"Neither we not ATC were aware of the TPO and Tandridge did not demur from that position."