When a successful British ghostwriter, The Ghost, agrees to complete the memoirs of former British Prime Minister Adam Lang, his agent assures him it’s the opportunity of a lifetime. But the project seems doomed from the startâ€”not least because his predecessor on the project, Lang’s long-term aide, died in an unfortunate accident. The Ghost flies out to work on the project, in the middle of winter, to an oceanfront house on an island off the U.S. Eastern seaboard. But the day after he arrives, a former British cabinet minister accuses Lang of authorizing the illegal seizure of suspected terrorists and handing them over for torture by the CIAâ€”a war crime. The controversy brings reporters and protesters swarming to the island mansion where Lang is staying with his wife, Ruth, and his personal assistant (and mistress), Amelia. As The Ghost works, he begins to uncover clues suggesting his predecessor may have stumbled on a dark secret linking Lang to the CIAâ€”and that somehow this information is hidden in the manuscript he left behind.

As the film opens, Dr. Malcolm Crowe (Bruce Willis) a prominent child psychologist, returns home one night with his wife, Anna Crowe (Olivia Williams), from an event in which he was honored for his efforts with children. The two discover they are not alone вЂ“ Vincent Gray (Donnie Wahlberg), a former patient of Crowe’s, appears in the doorway of their bathroom brandishing a gun saying, “I don’t want to be afraid no more.” Grey accuses Crowe of failing him, and Crowe recognizes Vincent as a former patient whom he once treated as a child for hallucinations. Grey shoots Crowe in the stomach, and seconds later turns the gun on himself. The scene fades away with Crowe’s wife by his side.

The next fall Crowe is shown working with another boy, nine year-old Cole Sear (Haley Joel Osment), with a condition similar to Vincent’s. Crowe becomes dedicated to this patient, though he is haunted by doubts over his ability to help him after his failure with Vincent. Meanwhile, he apparently begins to neglect his wife, with whom his relationship is falling apart.

Crowe earns Cole’s trust and Cole eventually confides in him that he can “see dead people.” Though Crowe at first thinks Cole is delusional, he eventually comes to believe that Cole is telling the truth and that Vincent may have had the same ability as Cole. He realizes this one night as he is listening to one of his old tapes, recorded while he was treating Vincent, and hears the pleading voices of dead people in the background. He suggests to Cole that he try to find a purpose for his gift by communicating with the ghosts, perhaps to aid them in their unfinished business on Earth. Cole at first does not want to heed this advice, as the ghosts terrify him, but he soon decides to try it.

…

His faith in himself now restored as a result of his success with Cole, Crowe returns to his home, where he finds his wife asleep on the couch with the couple’s wedding video on in the background, not for the first time. As she sleeps, Anna’s hand releases Malcolm’s wedding ring (which he suddenly discovers he has not been wearing), revealing the twist ending of the film: Crowe himself is unwittingly one of Cole’s ghosts, having been killed in the opening scene. Due to Cole’s efforts, Crowe’s unfinished business вЂ” rectifying his failure to understand Vincent вЂ” is finally complete. Recalling Cole’s advice, Crowe speaks to his sleeping wife and fulfills the second reason he returned, saying she was “never second,” and that he loves her. Releasing her to move on with her own life, he is free to leave behind the world of the living. The film ends on a short clip of their wedding tape that dissolves into black.