In the Mouth of Madness is a 1994 American supernatural horror film directed and scored by John Carpenter and written by Michael De Luca. It stars Sam Neill, Julie Carmen, Jürgen Prochnow, David Warner and Charlton Heston. Neill stars as John Trent, an insurance investigator who visits a small town while looking into the disappearance of a successful author of horror novels, and begins to question his sanity as the lines between reality and fiction seem to blur. Informally, the film is the third installment in what Carpenter refers to as his "Apocalypse Trilogy", preceded by The Thing (1982) and Prince of Darkness (1987).
In the Mouth of Madness pays tribute to the works of author H. P. Lovecraft in its exploration of insanity and its title, the latter being derived from the Lovecraft novella At the Mountains of Madness. Distributed by New Line Cinema, In the Mouth of Madness received mixed reviews upon release, but has since garnered a cult following.
In the midst of an unspecified disaster, Dr. Wrenn visits John Trent, a patient in a psychiatric hospital, and Trent recounts his story:
Trent, a freelance insurance investigator, has lunch with a colleague, the owner of an insurance company, who asks Trent to work with his largest client investigating a claim by New York-based Arcane Publishing. During their conversation, Trent is attacked by a man wielding an axe who, after asking him if he reads popular horror novelist Sutter Cane, is shot dead by the police. The man was Cane's agent, who went insane and killed his family after reading one of Cane's books.
Trent meets with Arcane Publishing director Jackson Harglow, who tasks him with investigating the disappearance of Cane and recovering the manuscript for his final novel. He assigns Cane's editor, Linda Styles, to accompany him. Linda explains that Cane's stories have been known to cause disorientation, memory loss and paranoia in "less stable readers." Trent is skeptical, convinced the disappearance is a publicity stunt. Trent notices red lines on the covers of Cane's books, which, when aligned properly, form the outline of New Hampshire and mark a location alluded to be Hobb's End, the fictional setting for many of Cane's works.
They set out to find the town. Linda experiences bizarre phenomena during the late-night drive, and they inexplicably arrive at Hobb's End in daylight. Trent and Linda search the small town, encountering people and landmarks described as fictional in Cane's novels. Trent believes it all to be staged, but Linda disagrees. She admits to Trent that Arcane Publishing's claim was a stunt to promote Cane's book, but the time distortion and exact replica of Hobb's End were not part of the plan.
Linda enters a church to confront Cane, who exposes her to his final novel, In the Mouth of Madness, which drives her insane; she begins embracing and kissing Cane passionately. A man approaches Trent in a bar and warns him to leave, then commits suicide. Outside the bar, a mob of monstrous-looking townspeople descend upon him. Trent drives away from Hobb's End, but is repeatedly teleported back to the center of town. After crashing his car, Trent awakens inside the church with Linda, where Cane explains that the public's belief in his stories freed an ancient race of monstrous beings which will reclaim the Earth. Cane reveals that Trent is merely one of his characters, who must follow Cane's plot and return the manuscript of In The Mouth of Madness to Arcane Publishing, furthering the end of humanity.
After giving Trent the manuscript, Cane tears a giant photograph of his face open, creating a portal to the dimension of Cane's monstrous masters. Trent sees a long tunnel that Cane said would take him back to his world, and urges Linda to come with him. She tells him she can't, because she has already read the entire book. Trent races down the hall, with Cane's monsters close on his heels. He trips and falls, then suddenly finds himself lying on a country road, apparently back in reality. During his return to New York, Trent destroys the manuscript. Back at Arcane Publishing, Trent relates his experience to Harglow. Harglow claims ignorance of Linda; Trent was sent alone to find Cane, and the manuscript was delivered months earlier. In the Mouth of Madness has been on sale for weeks, with a film adaptation in post production. Trent encounters a reader of the newly released novel, who is bleeding from his altered eyes, murders him with an axe, is arrested for murder and sent to the asylum.
After Trent finishes telling his story, Dr. Wrenn judges it a meaningless hallucination. Trent wakes the following day to find the asylum abandoned. He departs as a radio announces that the world has been overrun with monstrous creatures, including mutating humans, and that outbreaks of suicide and mass murder are commonplace. Trent goes to see the In the Mouth of Madness film and discovers that he is the main character. As he watches his previous actions play out on screen - including a scene where he insisted to Linda "This is reality!" - Trent begins laughing hysterically before breaking down crying, finally realizing he was a character in the book all along.