Prosecutors did not charge Mr. Schulte with stealing C.I.A. documents until 10 months later, a sign that they most likely struggled early on to build a case against him. He will be tried separately on the child pornography charges. (His former lawyer had argued that Mr. Schulte ran a business hosting a computer server for others and did not know what users were putting on the server.)

After Mr. Schulte’s arrest, he was released on the condition he remain at home. He was thrown in jail a few months later after he violated a federal judge’s order not to use the internet without the court’s permission.

The case then took a bizarre turn. While in jail, he and another inmate smuggled in cellphones, prosecutors said, allowing Mr. Schulte to create a Twitter account under the name Jason Bourne, a fictional movie character who worked as a C.I.A. operative.

On social media, he accused the government of planting child pornography on his computer, according to court filings.

He also called reporters at The New York Times and The Washington Post to share sensitive information about the investigation, prosecutors alleged, and later disclosed classified information to his parents and others.

The Justice Department asked that Mr. Schulte be placed in solitary confinement within the jail unit reserved for the most high-risk, dangerous detainees. Two of the criminal charges against him relate to allegations involving his conduct during incarceration.

At trial, the government intends to show jurors Mr. Schulte’s writings from notebooks he kept in jail. In one of them, he wrote that if the government did not pay him $50 billion in restitution, he would “visit every country in the world” and try to break up “diplomatic relationships, close embassies and U.S. occupation across the world.”