In 2012, while on bail, Julian Assange was granted political asylum in the Ecuadorian Embassy in London, where he sought to avoid extradition to Sweden, and what his supporters said was the possibility of subsequent extradition to the US. On 11 April 2019, Ecuador revoked his asylum, he was arrested for failing to appear in court, and carried out of the embassy by members of the London Metropolitan Police. Following his arrest, he was charged and convicted, on 1 May 2019, of violating the Bail Act, and sentenced to fifty weeks in prison. While in prison the US revealed a previously sealed 2018 US indictment in which Assange was charged with conspiracy to commit computer intrusion related to his involvement with Chelsea Manning and WikiLeaks.

On 23 May 2019, a US grand jury added 17 espionage charges also related to his involvement with Chelsea Manning, making a total of 18 federal charges against Assange in the US. On 25 June 2020 a new indictment was filed alleging that since 2009, Assange had attempted to recruit hackers and system administrators at conferences around the world and conspired with hackers including members of LulzSec and Anonymous. The new indictment described Assange's alleged efforts to recruit system administrators, Assange and WikiLeaks' role in helping Edward Snowden flee the US, and their use of Snowden as a recruitment tool, and WikiLeaks' exploiting a vulnerability in the United States Congress' system to access and publish the Congressional Research Service reports.Milligan, Ellen (29 June 2020). Julian Assange Lawyers Say New U.S. Indictment Could Derail Extradition. MSN News via Bloomberg News. Archived from the original on 2 July 2020. Retrieved 2 July 2020. Assange's defenders have responded to U.S. accusations, describing him as a journalist who did nothing more than publish leaked information that embarrassed the U.S. government.

While there was support from some American journalism institutions and from bi-partisan politicians for Assange's arrest and indictment, several non-government organisations for press freedom condemned it. The New York Times's editorial board warned that "The administration has begun well by charging Mr. Assange with an indisputable crime. But there is always a risk with this administration — one that labels the free press as “the enemy of the people” — that the prosecution of Mr. Assange could become an assault on the First Amendment and whistle-blowers." The case was dismissed in June 2024 after Assange pleaded guilty to a charge of “conspiracy to obtain and disclose national defence information” as part of a plea deal which, due to time already served, resulted in his release from prison.

Background Publication of material from Manning In 2010 while working with WikiLeaks, Assange was contacted by Chelsea Manning (then Bradley Manning), who gave him classified information containing various military operations conducted by the US government abroad. The material included the Baghdad airstrike of 2007, Granai Airstrike of 2009, the Iraq War Logs, Afghan War Diaries, and the Afghan War Logs, among others. Some of these documents were published by WikiLeaks and leaked to other major media houses including The Guardian between 2010 and 2011.

Critics of the release included Julia Gillard, then Australian Prime Minister, who said the act was illegal, and the vice-president of the United States, Joe Biden, who called him a terrorist."WikiLeaks acting illegally, says Gillard," Sydney Morning Herald, 2 December 2010. Retrieved 17 March 2014.Ewen MacAskill, "Julian Assange like a hi-tech terrorist, says Joe Biden," The Guardian, 20 December 2010. Retrieved 17 March 2014. Others, including Brazilian president Luiz da Silva and Ecuadorean president Rafael Correa, supported his actions, while sources in Russian president Dmitry Medvedev's office said he deserved a Nobel prize for his actions."When Wikileaks founder Julian Assange met Ecuadorean president Rafael Correa". The Daily Telegraph. 20 June 2012.'Russia: Julian Assange deserves a Nobel Prize' ," The Jerusalem Post, 12 November 2010. The Manning leaks also led WikiLeaks and Julian Assange to receive various accolades and awards,Joel Gunter, "Julian Assange wins Martha Gellhorn Prize for Journalism," Journalism.co.uk, 2 June 2011. Retrieved 17 March 2014. but at the same time attracted criticism and police investigations.

Criminal investigation and indictment Following the Manning leaks, authorities in the US began investigating Assange and WikiLeaks. Assange broke bail to avoid extradition to Sweden, where he was wanted for questioning in connection with an arrest warrant for one charge of unlawful coercion, two charges of sexual molestation, and one charge of rape, and became a fugitive. The Australian government distanced itself from Assange.

In 2012, he sought and gained political asylum from Ecuador, granted by Rafael Correa, after visiting the country's embassy in London."Julian Assange asylum bid: ambassador flies into Ecuador for talks with President Correa". The Daily Telegraph (London). 23 June 2012. Retrieved 19 March 2014."U.K.: WikiLeaks' Assange won't be allowed to leave", CBS News, 16 August 2012. Retrieved 18 March 2014.

At the same time, an investigation by the FBI was going on regarding Assange's release of the Manning documents,David Carr and Ravi Somaiya, "Assange, back in news, never left U.S. radar", The New York Times, 24 June 2013. Retrieved 15 March 2014. and according to court documents dated May 2014, he was still under active and ongoing investigation.Philip Dorling, "Assange targeted by FBI probe, US court documents reveal," The Sydney Morning Herald, 20 May 2014. Retrieved 29 August 2014. A warrant issued to Google by the district court cited several crimes, including espionage, conspiracy to commit espionage, theft or conversion of property belonging to the United States government, violation of the Computer Fraud and Abuse Act and general conspiracy.

An indictment against Assange was filed on 6 March 2018 and remained sealed until 11 April 2019.

In February 2019, Chelsea Manning was subpoenaed to appear before a grand jury in Virginia in the case. When Manning condemned the secrecy of the hearings and refused to testify, she was jailed for contempt of court on 8 March 2019. On 16 May 2019, Manning refused to testify before a new grand jury investigating Assange, stating that she "believe[d] this grand jury seeks to undermine the integrity of public discourse with the aim of punishing those who expose any serious, ongoing, and systemic abuses of power by this government". She was returned to jail for the 18-month term of the grand jury with financial penalties. In June 2021, Chelsea Manning said her grand jury resistance was not contingent on Assange being the target, and that she was not even sure he was. "I treated this no differently than if it was for a protest or for some other grand jury—if it was a grand jury in general, I would respond the same way. But it did appear that this one was about, specifically, the 2010 disclosures; the media was speculating, but our legal team and ourselves, we never got full confirmation as to whether that was the case."

Before Assange's arrest On 2 April 2019, Ecuador's president Moreno said that Assange had violated the terms of his asylum, after photos surfaced on the internet linking Moreno to a corruption scandal. WikiLeaks said it merely reported on a corruption investigation against Moreno by Ecuador's legislature. WikiLeaks reported a source within the Ecuadorian government saying that, due to the controversy, an agreement had been reached to expel Assange from the embassy and place him in the custody of UK police. According to Assange's father, Ecuador revoked Assange's asylum as part of a deal with the U.S. to receive a loan from the International Monetary Fund.

Arrest by the Metropolitan Police

Following the revocation of Assange's asylum, on 11 April 2019 the ambassador of Ecuador to the UK extended an invitation to the Metropolitan Police to enter the embassy where he had been living since 2012. Subsequently, Assange was apprehended and transported to a police station in central London and charged with breaching the Bail Act 1976.

Foreign Minister José Valencia said an audio recording captured Assange threatening Ambassador Jaime Merchan with a panic button that he said would bring devastating consequences for the embassy in the event of his arrest. Ecuador's authorities shared the threat with British authorities and when arresting Assange they were careful to not let him trigger any possible emergency plans. Moreno accused Assange of installing electronic distortion equipment in the embassy, blocking security cameras, mistreating guards and accessing security files without permission and stated that Ecuador withdrew Assange's asylum after he interfered in Ecuador's domestic affairs. Moreno added that "the patience of Ecuador has reached its limit on the behaviour of Mr. Assange" and Foreign minister José Valencia listed nine reasons why Assange's asylum was withdrawn, and said Ecuador had no choice after Assange's "innumerable acts of interference in the politics of other states".

Assange was carrying Gore Vidal's History of the National Security State during his forcible removal from the embassy and shouted "the UK has no sovereignty" and "the UK must resist this attempt by the Trump administration ... " as five police officers put him into a van. The news of the arrest went viral within minutes and several media outlets reported it as breaking news. President Moreno called Assange a "spoiled brat" in the wake of the arrest.

CNN reported that "British police entered the Ecuadorian Embassy in London... forcibly removing the WikiLeaks founder Julian Assange on a US extradition warrant and bringing his seven-year stint there to a dramatic close."

Conviction for breach of bail At a hearing at Westminster Magistrates' Court a few hours after his arrest, the presiding judge found Assange was guilty of breaching the terms of his bail.

Assange's defence said chief magistrate Emma Arbuthnot, who had dealt with his case, was biased against him as her husband, a former MP and Chairman of Defence Select Committee, was directly affected by WikiLeaks' allegations. According to an article by Mark Curtis and Matt Kennard in the Daily Maverick, Emma Arbuthnot's husband, James Arbuthnot, "has financial links to the British military establishment, including institutions and individuals exposed by WikiLeaks". The Intercept reported that Emma Arbuthnot's husband and son had "links to people cited for criminal activities in documents published by WikiLeaks" and that her family had "additional connections to the intelligence services and defense industries". Judge Michael Snow said it was "unacceptable" to air the claim in front of a "packed press gallery" and that Assange's "assertion that he has not had a fair hearing is laughable. And his behaviour is that of a narcissist who cannot get beyond his own selfish interests." Judge Snow also said "He has chosen not to give evidence, he has chosen to make assertions about a senior judge not having the courage to place himself before the court for the purpose of cross-examination. Those assertions made through counsel are not evidence as a matter of law. I find they are not capable of amounting to a reasonable excuse."

Assange was remanded to Belmarsh Prison, and on 1 May 2019 was sentenced to 50 weeks imprisonment. The judge said he would be released after serving half of his sentence, subject to other proceedings and conditional upon committing no further offences. The United Nations Working Group on Arbitrary Detention said that the verdict contravened "principles of necessity and proportionality" for what it considered a "minor violation". Assange appealed against his sentence, but dropped his appeal in July.