The US government revoked his passport while he was in an international "no man's land" (i.e. the international side of Russian customs), effectively making him stateless. He had originally planned to transit through Russia on to Cuba, and thereafter Ecuador or Venezuela. By cancelling his passport, the US government effectively trapped him in Moscow.
Heck, he couldn't have even have gotten himself illegally smuggled out. The US government forced the Bolivian president's plane, on its way back from Moscow to Bolivia, to land in Austria, where it was searched. Just on the mere suspicion that Snowden was on board. Forcing down the plane of the head of a sovereign nation and subjecting them to a search in a foreign jurisdiction sounds pretty damn illegal to me. Actually, it sounds like an act of war. But I suppose that doesn't matter when your country spends more on its military than the next 19 countries combined.
Also worth noting that the crimes Snowden has been charged with are two counts of violating the Espionage Act, a law passed just after the US entered WWI. Its original intent is clearly to punish people who endangered military operations during a time of total war. Given this intended purpose, it's a near certainty Snowden would be found guilty if he ever came back to the US to 'face the music':
Professor at American University Washington College of Law and national security law expert Stephen Vladeck has said that the law “lacks the hallmarks of a carefully and precisely defined statutory restriction on speech.” Trevor Timm, executive director of the Freedom of the Press Foundation, said, “basically any information the whistleblower or source would want to bring up at trial to show that they are not guilty of violating the Espionage Act the jury would never hear. It’s almost a certainty that because the law is so broadly written that they would be convicted no matter what.”
https://en.wikipedia.org/wiki/Espionage_Act_of_1917#Criticis...