Defense attorneys for James Holmes, 24, made the disclosure in a court motion. It sought to discover the source of leaks to some media outlets that Holmes sent the psychiatrist a package containing a notebook with descriptions of an attack.
The motion said the leak violated a judge's gag order and jeopardized Holmes' right to a fair trial.
"The government's disclosure of this confidential and privileged information has placed Mr. Holmes' constitutional rights to due process and a fair trial by an impartial jury in serious jeopardy," wrote the attorneys.
The motion added that the package contained communications between Holmes and his psychiatrist that should be shielded from public view. The document describes Holmes as a "psychiatric patient" of Dr. Lynne Fenton.
Calls to Holmes' lawyer, Daniel King, were referred to the head of the Colorado State Public Defender's office, Douglas Wilson, who was out of the office and did not immediately return a message seeking comment.
A message left with Fenton's office was not immediately returned. The University of Colorado's website identifies her as the medical director of the school's Student Mental Health Services.
Casmir Spencer, a spokeswoman for the Arapahoe County District Attorney's office, said she could not comment.
The package was seized by authorities on Monday after it was discovered in the mailroom at the University of Colorado, Denver. It's unclear if it was sent before the attack at the July 20 midnight showing of "The Dark Knight Rises" that left 12 dead and dozens of others injured.
Authorities said Holmes legally purchased four guns before the attack at Denver-area sporting goods stores - a semiautomatic rifle, a shotgun and two pistols. To buy the guns, Holmes had to pass background checks that can take as little as 20 minutes in Colorado.
State law bars from purchasing firearms people who have been found mentally defective by a judge or have been committed to a mental institution. The statute makes no restrictions on buyers who are being treated for possible mental illness.
Holmes spent a year as a graduate student in the university's intimate, competitive neuroscience program before dropping out without explanation three days after taking a year-end final, university officials have said.
They have refused to disclose more about Holmes, citing the judge's gag order on law enforcement agencies.
At a press conference earlier this week, they acknowledged that students in the program that Holmes studied in are carefully monitored. They said a graduate student experiencing problems would normally be referred to student support services.