His lawyer Mark Summers had argued in court that the United Kingdom arrest warrant no longer had a objective or function, as it relates to a Swedish sex crimes investigation now concluded.
Assange, 46, fled to the embassy, located in an apartment in the wealthy district of Knightsbridge, to avoid extradition to Sweden to face an allegation of rape, which he denied.
An Australian who has been granted Ecuadorian citizenship, Mr Assange is wanted in Britain for breaching his bail conditions when he entered the embassy, instead of handing himself in to be sent to Sweden.
Swedish prosecutors dropped the case previous year, saying there was no prospect of bringing Assange to Sweden in the foreseeable future.
A prosecutor did however say that if Assange is ever passing through Sweden, he should still pop in.
Swedish authorities dropped the rape charges in May 2017.
A separate evening demonstration outside the Ecuadoran Embassy was planned for Tuesday evening.
His clients has repeatedly pointed out that if he leaves the Embassy where he has been holed up for half a decade he fears being extradited to the United States where he could face a severe sentence for leaking hundreds of thousands of secret USA military and diplomatic documents.
But Crown Prosecution Service lawyer Aaron Watkins told the court it would be "absurd" if a defendant was effectively rewarded for managing to evade proceedings for sufficiently long that they fell away.
Assange has been at the embassy for six years.
For the time being, Assange is free from arrest so long as he stays inside the embassy of Ecuador, which has granted him political asylum. Mr Assange has been released on bail, 2.
Earlier this year Ecuador's foreign minister Maria Fernanda Espinosa said the South American nation was seeking a "third country or a personality" to broker a final settlement with the British government to resolve Mr Assange's future. Some carried placards reading "Assange safe passage" and "Don't shoot the messenger".