Martin Vail (Richard Gere) is a prominent, cynical defense attorney in Chicago who loves the public spotlight and does everything he can to get his high-paying clients off crimes they commit on legal technicalties. One day, Vail sees a news report about the arrest of Aaron Stampler (Edward Norton), a young, stuttering, simpleton altar boy accused of murdering the beloved and hightly respected Archbishop Rushman (Stanley Anderson) of the Catholic Church in Chicago. As a result, Vail jumps at the chance to represent the young man pro-bono.
At first, the spotlight-loving Vail is interested primarily in the publicity that the case will bring, yet during his meetings at the county jail with Aaron, Vail comes to believe that his client is truly innocent, much to the chagrin of the prosecutor (and Vail's former lover), Janet Venable (Laura Linney).
As the murder trial begins, Vail discovers that powerful civic leaders, including the corrupt District Attorney John Shaughnessy (John Mahoney) as well as the mayor and even the regional governor, have lost millions of dollars in real estate investments due to a decision by the Archbishop not to develop on certain church lands. The Archbishop received numerous death threats as a result. Vail also learns through the grapevine that the archbishop had been sexually abusing altar boys, including Stampler.
Introducing this evidence, while it would make Stampler more sympathetic to the jury, would also give his client a motive for murder, something the prosecution otherwise has lacked.
The trial does not proceed well for the defense, as there is considerable evidence against Stampler since he was found running from the crime scene of the Archbishop's apartment with blood splattered all over his clothes, and he claims not to remember anything about the murder. However, public opinion holds Stampler almost certainly guilty and there are denials by the public about the Archbishop's true nature of being a pedophile.
After Vail sneaks into the Archbishop's apartment to look for more evidence, he finds a pornographic videotape of Aaron Stampler with another alter boy and a teenage girl, named Linda, performing in sexual acts while the Archbishop is behind the camera filming everything. Vail anonymously sends a copy of it to Janet knowing that she will introduce it as evidence, against the advice of D.A. John Shaughnessy who wants to keep his dirty dealings with Archbishop Rushman hidden at any cost.
When Vail confronts his client and accuses him of having lied, Aaron breaks down crying and suddenly transforms into a new persona: a violent, foul-mouthed sociopath who calls himself "Roy." He confesses to the murder of the Archbishop for the years of molestation and abuse. "Roy" then throws Vail against a wall of his jail cell, injuring him. When this incident is over, Aaron Stampler reemerges and appears to have no recollection of it. Molly Arrington (Frances McDormand), the psychiatrist examining Aaron, is convinced he suffers from multiple personality disorder due to childhood abuse by his own father, in which apparently resurfaced following the molestation of the Archbishop upon him. However, Vail realizes that he cannot enter an insanity plea during an ongoing trial.
As a result, Vail begins to sets up a confrontation in court by dropping hints about the Archbishop's true nature as well as Aaron's multi-personality disorder. At the climax, Vail puts Aaron on the witness stand where he gently probes him in direct examination over his unhappy childhood and troubled dealings with the Archbishop. During cross-examination, after Janet Venable questions him harshly, Aaron turns into Roy in open court and charges at her, threatening to snap her neck if anyone comes near him. Aaron is subdued by courthouse marshals and is rushed back to his holding cell.
In light of Aaron's apparent insanity, the judge (Alfre Woodard) dismisses the jury in favor of a bench trial and then finds Aaron not guilty by reason of mental insanity, and remands him to a maximum security mental hospital. Yet afterwords, Janet is fired from her job by her boss for allowing the corrupt dealings of the Archbishop to be made public as well as the sexual abuse of alter boys that both the Catholic Church and the city council have been trying to keep under wraps.
In the final scene, Vail visits Aaron in his cell to tell him this news. Aaron says he recalls nothing of what happened in the courtroom, having again "lost time." However, just as Vail is leaving, Aaron asks him to: "tell Miss Venable I hope her neck is okay," which is not something that Aaron should have been able to remember if he had "lost time." Due to this slip, Vail points this out, whereupon Aaron Stampler grins slyly and reveals that he has been pretending to be insane the whole time. No longer stuttering, the murderous but perfectly sane Aaron admits that he didn't make up the identity of Roy... he made up the character of Aaron. Aaron Stampler now admits to having murdered Archbishop Rushman, as well as his girlfriend, Linda, whom the cleric also had molested. Aware that he would not get away with killing the Archbishop, Aaron made up his simpleton personality to gain sympathy from his lawyer as well as the judge and jury, and when his scheme had become compromised, he made up the name of 'Roy' (his real sociopathic personality) to make it appear that he committed the murder under a split personality. Stunned and disillusioned at how he was so easily fooled and manipulated by his own client, Vail walks away, with Aaron/Roy taunting him from the cell. Vail leaves the courthouse through the back door and takes a taxi away, now more angry and cynical then ever, but ashamed to be in the public light anymore.