But it was a tough acclimation, his friends later said, in large part because of the military's "don't ask, don't tell" policy. According to friends and his own writings on the Internet, Manning is openly gay.
Then, in 2009, Manning deployed to Iraq.
He was at Forward Operating Base Hammer in southeast Baghdad, where he worked as an analyst reviewing possible threats to U.S. troops.
According to Fein, the prosecutor, within two weeks of his arrival in Iraq, Manning began working with WikiLeaks founder Julian Assange over what to leak and how to do it.
Assange has taken refuge at the Ecuadorean Embassy in London to avoid extradition to Sweden to face questioning in sex-crimes allegations, charges he claims are a ruse by allies of Washington to arrest him and then extradite him to the United States to face charges.
Manning spent hours at work during off-hours downloading documents, Fein said.
Manning, the prosecutor said, was well aware of the military's policy about divulging classified material and the repercussions of doing it. The soldier had even taught classes about protecting the material, Fein said.
"Manning had no allegiance to the United States," Fein told the court last week, adding that he was "not a whistle-blower; he was a traitor."
But Manning's attorney offered another picture, one in which the war deeply affected his client.
It began, his attorney told the court, after an attack on a convoy with his comrades. A roadside bomb exploded beneath a car full of civilians that had pulled aside to let the military vehicles pass.
Although members of his 305th Military Intelligence Battalion were not hurt, Coombs said, at least one civilian was killed. That changed Manning's outlook on the war, his lawyer said. He "struggled."
He was further disturbed by the "Collateral Murder" video, the attorney said.
"Did they all deserve to die? That is what Pfc. Manning is seeing when he watches this," Coombs told the judge after playing the video in court.
It was for those reasons, according to Coombs, that Manning then started selecting information to reveal, believing that it would be better if it were public.
Coombs said his client was selective in the information he diverted from a controlled-access computer system where he worked as an "all source" intelligence analyst.
What would you do?
Manning came to the attention of authorities in May 2010 after a confidential informant, later identified as ex-hacker Adrian Lamo of Sacramento, California, came forward with a stunning story.
It began with a message said to be posted by Manning, using the instant message handle "bradass87."
"If you had unprecedented access to classified networks 14 hours a day 7 days a week for 8+ months, what would you do?" it read.
According to testimony, that was purportedly part of a string of instant messages that a person sent to Lamo, who was convicted in 2004 for hacking The New York Times, Microsoft and Lexis-Nexis computer systems.
Over a period of days beginning on May 22, 2010, Lamo testified, he and the man identified as Manning instant-messaged about the release of the documents and videos.
Lamo has said he reported Manning to authorities.
Army Criminal Investigation Command Special Agent David Shaver has testified that the chat logs that Lamo provided to the Army largely matched chat logs found on Manning's computer in Iraq.
Manning was arrested in Iraq on May 27, 2010, and then transferred to Kuwait before being returned to the United States two months later.