In 1990, architect Frank Bannister loses his wife, Debra, in a car accident. He gives up his profession, letting his unfinished "dream house" sit incomplete for years. Following the accident, Frank gains the power to see ghosts and befriends three: a 1970s gangster named Cyrus, a 1950s nerd named Stuart and a gunslinger from the Old West called the Judge. Cyrus, Stuart and the Judge haunt houses in the area to accumulate work for Frank's ghostbusting business; Frank then "exorcises" the houses for a fee, even though he is depicted by locals as a con man. Five years later, Dr. Lucy Lynskey summons Frank, who recently conned her and her husband Ray. Frank discovers that Ray has been killed , and an encounter with his ghost leads Frank to discover that an entity resembling the Grim Reaper is killing people and marking numbers on their foreheads that only the psychic can see.
Frank tries helping the people whom the Reaper is targeting because his wife Debra died with a similar number, 13, carved into her forehead. Because Frank can see the numbers ahead of time he can foretell the murders, but this puts him under suspicion with the police and FBI agent Milton Dammers. Highly anal and disturbed from years of undercover work, Dammers is convinced that Frank is responsible for the killings, using some sort of psychic power to stop the hearts of those he subconsciously wishes dead while creating the visage of the Grim Reaper to absolve himself of guilt. Frank is captured and detained after the town's newspaper editor, Madga, who despised Frank's reputation, is killed. While Frank is being detained, Lucy begins to investigate the murders and becomes a target of the Reaper. She is attacked while visiting Frank in jail, but they the manage to escape with the help of Cyrus and Stuart, who are both killed in the process. Frustrated by his inability to fight the Reaper in a mortal body, Frank wants to commit suicide so he can stop the Reaper's killing spree. Instead, Lucy helps Frank have a near death experience by entering hypothermia and using barbiturates to stop his heart. Dammers abducts Lucy, then confesses that he had been a victim of Charles Manson and his "Family" in 1969. Frank appears to come to Lucy's aid. In his ghostly form, Frank confronts the Reaper and discovers that the killer is the ghost of Johnny Bartlett , a hospital orderly who killed 12 people in a killing spree, where he worked, 32 years ago, then died in the electric chair.
Frank reveals Bartlett's true form, but his spirit is forced back into his body by Lucy resuscitating him. After learning the Reaper's identity, Lucy worries that Patricia will become one of Bartlett's targets. She goes to Patricia's house and discovers that Patricia is on friendly terms with Bartlett's ghost, who tells her to kill Lucy. Patricia kills her mother and tries to kill Lucy, but Frank rescues her. Lucy and Frank trap Bartlett's spirit in his urn, which they find in Patricia's room. Hoping to take the ashes to holy ground, they run for the chapel of the now-abandoned psychiatric hospital to send Bartlett's ghost to Hell. Frank realizes that this is the hospital where the original crimes were committed, helplessly reliving the events of Bartlett's killing spree in flashback visions, while Patricia, armed with a shotgun, and Dammers chase them through the ruins. Dammers throws the ashes away, releasing Bartlett's ghost again before his head is blown off by Patricia. Bartlett's ghost and Patricia hunt down Frank and Lucy. Frank realizes that Bartlett's ghost drove the two off the road and killed Frank's wife. Patricia used Frank's utility knife to cut the number into her forehead.
Out of bullets, Patricia strangles Frank with the shotgun, then prepares to kill Lucy. Frank's spirit, however, returns and rips Patricia's spirit from her body, dragging her up the Corridor of Life with him. Bartlett grabs Patricia's ghost, while Frank makes it to Heaven, where he's reunited with Cyrus and Stuart. The three watch as Bartlett and Patricia's spirits are dragged to Hell. After meeting Debra's spirit, Frank learns it is not yet his time and is sent back to his body , waking up in Lucy's arms. Frank and Lucy fall in love, and due to her experiences, Lucy can now see ghosts as well. Frank returns to being an architect, demolishing the dream house for his wife that he never finished and building a life with Lucy. As for Dammers, he is a spirit, riding around in the back of Sheriff Walt Perry's car.