The narrator, Mike Noonan, an author living in Derry, Maine, suffers from severe writer's block after the death of his wife, Johanna (called Jo), from an undiagnosed brain aneurysm. His unborn child died as well; which further exacerbates his writer's block. Fortunately Mike has four unpublished manuscripts that will hide his problems for a time.
Four years after Jo's death, Mike begins to experience nightmares set at his summer house in TR-90, an unregistered township in Maine. He decides to confront his fears and moves to the house, known to locals as Sara Laughs. Mike finds Kyra, a young girl, walking down the road on her own. He brings her to safety and meets her embarrassed mother, Mattie; they talk for a while. Mattie is about two decades younger than Mike.
Mike learns from his caretaker Bill that Mattie's father-in-law is Max Devore, an elderly rich man who will do anything to gain custody of his granddaughter. Kyra's father, Lance, has died. Max learns of Mike and threatens him over the situation. The writer hires John Storrow, a custody lawyer, for Mattie; Mike is seemingly developing feelings for her. Invited to dinner, Mike gets to know Mattie and Kyra, and learns more about their situation. In passing, Mattie repeats a remark once made to her by Max Devore, implying that the two men's great-grandfathers were associates. Mike is puzzled by this, since his family came from points quite distant from TR-90.
Max manages to drag Mike into the custody battle even further by forcing him to make a deposition for the impending custody hearing. Accompanied by a local lawyer, Romeo Bissonette, Mike makes the custody lawyer hired by Devore look foolish by beating him at his own game and calling his bluff.
Mike begins to write again, while both Kyra and Mike experience hauntings in their homes. The author realizes that the ghost of Jo is assisting him in solving the mystery of Sara Tidwell, a blues singer whose spirit is haunting Mike's house. Mike asks the locals what happened to Sara Tidwell, and is warned to refrain from digging in old scandals. He also learns that Jo frequently returned to the town in the year before her death, without telling him.
Max Devore threatens Mike again, and in an encounter with Mike, Max and his personal assistant, Rogette, almost succeed in drowning him. It's only due to the help from his wife's spirit that he is able to survive the attack. Then, in an unexpected turn of events, Max Devore commits suicide, which seemingly leaves Mattie and Kyra free from his influence. Throughout the novel, Mike experiences psychic phenomena. He has complex dreams of Sara Tidwell, Mattie and Jo; he speaks on the phone with Mattie and can tell not only what she is wearing, but what she is thinking. As the story progresses, Mike is increasingly "in the zone." After Devore's death, Mike is plagued by uneasy feelings on behalf of Mattie. The approaching storm is symbolic of this hovering dread. Clues gradually appear, provided by Jo, while Sara Tidwell's spirit fights to keep him from learning the truth. He begins to understand some of it when he notices how many names of local inhabitants begin with a "K" or "C." He learns how relatives of several people he knows in town have drowned in childhood.
Mike, Mattie, John, Romeo Bissonette (Mike's lawyer from his deposition) and George (a detective that helped Romeo with the trial), are having a party when two gunners make a drive-by shooting and hit nearly everyone in sight- Mattie fatally in the head, John in the shoulder, Romeo in the ankle and George in the arm and thigh. George takes out a pistol he's carrying and shoots at the car, rupturing the fuel tank, breaking the rear window, blowing out the rear tire and hitting the driver, which causes them to crash into a ditch, igniting the leaking gasoline. Mike, the only adult not hit, takes Kyra back to Sara Laughs as a huge storm breaks. He's acting under the influence of the ghost of Sara Tidwell and finds himself preparing to drown Kyra and commit suicide himself, going so far as to give Kyra cocoa and Benadryl to make her sleep, and drawing the bath. But there are still pieces to the mystery that Mike doesn't understand, and the ghost of Jo is trying to prevent him from doing what he's doing.
Jo's spirit calls Mike's attention to a novel he has begun to write. Hidden in the pages are clues that clarify some of the mysteries that have confronted him in the house. As Kyra sleeps, Mike goes to Jo's studio to search for answers. He discovers documents that Jo had hidden away before her death, among them a genealogy showing Mike's blood relationship to one of the town families. Several families had firstborn children with "K" names who had been murdered or died under suspicious circumstances. The genealogy shows that Mike and Jo's child (who was going to be named Kia) would've been the next firstborn child with a "K" name in the family line, had she been born.
Mike realizes this must be Sara Tidwell's curse for something that had been done to her. He returns to the house, checks on the still-sleeping Kyra and drains the bath meant for her drowning. He can feel Sara's influence, urging him to take Kyra to the lake, but he fights it off. He leaves the house once more with a shovel and a bottle of lye to search for Sara's grave, knowing that the only way to break the curse and keep Kyra safe is to destroy Sara's bones. On his way to where he suspects Sara is buried, the ghosts of Max Devore's grandfather and several members of the old families, attempt to thwart his progress. Mike learns in a vision that these men had viciously raped and killed Sara, and drowned her son Kito in the lake; furthermore, all the "K" children who have died were descendants of those men. Mike makes it to the gravesite, but Sara's ghost doesn't want the curse ended prematurely. She tries to stop Mike, and starts to assume corporeal form to do so. Jo appears in corporeal form herself and tells Mike he must hurry, as Sara has been taken over by an "Outsider" to harm Mike and prevent him from reaching Sara's bones. Jo struggles to fight off the Outsider while Mike digs up and destroys Sara's bones with the lye, ending the curse.
Returning to the house, Mike discovers that Max Devore's assistant Rogette has kidnapped Kyra, attempting to complete Sara's task. Mike follows Kyra and Rogette to a neighboring property, arriving just as Kyra bites Rogette and attempts to flee onto a floating dock heaving in the waves from the storm. Discovering the last mystery surrounding Sara's curse, Mike tries to hit Rogette and keep her away from Kyra. Mattie's ghost appears and knocks Rogette into the lake. Rogette tries to pull Mike in with her, but is impaled by wreckage from the dock. Mattie's ghost says her goodbyes to Mike and Kyra, tells Kyra that she's now Mike's "little guy".
The novel ends with an epilogue in which readers are told that Mike has retired from writing and is attempting to adopt Kyra. His status as a single, unrelated male complicates things, and the adoption has taken longer than Mike anticipated. Still, the state has allowed Mike to visit Kyra, and she has been allowed overnight stays with him. The outcome of the adoption is left unresolved at the end of the novel, but the reader is given hope that it will be a positive outcome.