Philip Galway-Cooper, and his wife Wendy, were prosecuted for failing to demolish the three-storey extension.
The couple have owned their detached Victorian house in Gayton Crescent, Hampstead, since 2007.
But the London Borough of Camden took enforcement action after they built the rear extension without permission, said Mr Justice Ouseley.
The council issued an enforcement notice in 2014, demanding that the couple completely demolish the extension.
They were also ordered to restore the part of the rear wall to which the extension is attached to its original condition.
The notice had to be complied with by September 2015, but the deadline came and went and the extension was not demolished.
Camden Council last year responded by mounting a criminal prosecution against the couple at Highbury Corner Magistrates Court.
But Mr and Mrs Galway-Cooper were acquitted after claiming that it was simply "impossible" to comply with the enforcement notice.
They argued that restoring the wall would mean removing a steel frame from the back of the building with potentially catastrophic consequences.
The work, even if feasible, would cost over £360,000 and putting in pilings to support the house would add another £150,000 to the bill, the couple argued.
The pair were acquitted after a district judge found that there was nothing they could do to comply with the notice.
Camden Council then challenged that decision at the High Court, insisting that the couple had not "done all that could reasonably have been expected of them".
But, dismissing the council's appeal, Mr Justice Ouseley said expert engineering evidence revealed the likelihood that any restored wall "would fail".
The construction job would be "exceedingly difficult" and it was "more likely than not that it could not be done," he added.
Although restoring the wall might not be "a complete and total physical impossibility", it had justifiably been described as "not feasible".
The judge said he had "considerable sympathy for the predicament faced by the council" in dealing with a breach of planning control.
The prospect of the unauthorised extension remaining in place was "troubling," he added.
But it was now for the council to decide whether to take any further steps to enforce its removal.
Its appeal dismissed, the council was ordered to pay Mr and Mrs Galway-Cooper's £20,000 legal costs bills.
London Borough of Camden v Galway-Cooper & Anr. Case Number: CO/5519/2017