This intense psychological drama centres around Mort Rainey (Johnny Depp), a successful author, who suffers a psychotic break when his wife has an affair with a man named Ted (Timothy Hutton). He puts off finalizing the divorce by retreating to his secluded cabin in the rural town of Tashmore Lake in upstate New York.
Depressed and suffering from writer's block, Mort is confronted one day by the mysterious John Shooter (John Turturro), a Mississippi dairy farmer who accuses him of plagiarism. Shooter leaves Mort with his manuscript 'Sowing Season' which he alleges was copied. Mort dismisses Shooter as a lunatic and throws the manuscript away, but his cleaning lady digs it out of the trash and presents it back to him. With his curiosity piqued, Mort reads the story and is surprised to discover its resemblance to his own story 'Secret Window'.
During his walk the following day, Shooter accosts Mort when he explains his story was published years before Shooter's existed. He is given a three-day ultimatum by Shooter to provide the proof. Mort sees a note attached to his door that says, “You have 3 days. No joking. No police.” That night, Mort finds Chico, his Australian Cattle Dog, stabbed to death with a screwdriver in his head. Mort immediately suspects Shooter and reports the incident to the arthritic Sheriff Dave Newsome (Len Cariou), who reacts with little enthusiasm.
Mort later drives to his house where his estranged wife Amy is living, to obtain a copy of the book and stews outside as he watches her leave with her new lover Ted. In New York City, Mort contacts Ken Karsch (Charles S. Dutton), a private investigator who assisted Mort in a previous incident, identical to the current situation. Ken travels to Tashmore Lake to watch over the cabin and to interview Tom Greenleaf (John Dunn Hill), the only witness to Mort and Shooter's conversation. Later, Shooter and Mort have an argument that ends up in Mort getting bruises on his wrists and being choked.
When Mort returns to his cabin, Amy calls saying their house was burned down. Mort had flashbacks of when he and Amy were happily married. Then a police officer tells him what caused the fire. He begins to suspect Ted of hiring Shooter to harass him because of their shared animosity towards one another. Ted mentions he's from a place called 'Shooter’s Bay'.
The next morning, Mort is perplexed to find his Jeep Cherokee idling in his driveway with Pall Mall cigarette butts smoldering in the ashtray (the same brand Shooter smokes). He shows up late to his meeting at the local diner with Tom Greenleaf and Ken and neither of them can be found and he learns from a waitress that Ken never showed up at all.
Mort sees Ted who is filling up his car with gas at a station and asks Ted where his “buddy” is. Ted gives Mort his divorce papers that Mort doesn’t want to sign. The two have a confrontation that causes Ted to break his hand. Back at the cabin, Mort receives a call from Shooter requesting a private meeting in the woods and when he arrives he finds Ken and Tom dead in Tom's truck. Mort faints and when he awakes, 3 hours later,
Shooter says they should meet at his house. Mort tries to cover up the crime by running the truck into a water-filled stone quarry, losing his watch in the process. Mort's literary agent sends a copy of the magazine with his published story via UPS and Mort picks it up at the post office. When he goes back to his car, he sees the package is already half open and then finds the specific pages containing the story have been cut out.
Mort wears Shooter’s hat and talks to himself. He tries to make connections to the pages cut out, Shooter’s Bay, along with the bruises Shooter gave earlier missing. He tells his himself, his "inner voice" to leave him alone. The voice said, “You are alone.” Mort comes to the conclusion that Shooter is a figment of his imagination; brought to life through Mort's dissociative identity disorder and created to carry out the acts of killing Chico, Tom, Ken and burning down his home since Mort didn’t have the courage to do it himself.
Angry and frustrated, Amy arrives at his cabin to get his signature to finalize the divorce settlement. She finds the cabin disheveled, with the word "shooter" carved throughout. Mort suddenly appears and Amy is struck by fear when she realizes that Mort's desire to 'shoot her'.
Mort, now wearing Shooter's hat and speaking with a southern accent, chases Amy outside to her car and stabs her in the ankle to prevent her from leaving. Ted arrives shortly afterwards, hearing Amy scream, and she watches helplessly as Mort ambushes and beheads him with a shovel while Amy screams vainly. Mort recites the ending of "Sowing Season" as he kills Amy off-screen.
Mort recovers from his writer's block and experiences a mood improvement, but is now the town pariah. Dave stops by the cabin to advise Mort he is the prime suspect of Amy and Ted's disappearance and will be arrested once the bodies are found, but Mort nonchalantly dismisses the threat. Dave leaves and Mort again recites the "perfect" ending to his story. There was a secret window that was obstructed by a large cabinet that overlooks a secret garden. It’s suspected that Mort put the bodies in the garden that is now filled with cornfields and that the corns are breaking down the bodies buried there so that police will never find them.