Seventeen-year-old Ellie is playing with her ghost dog, Kirby. She’s Lipan Apache, and the knowledge of how to raise animals from the dead has been passed down through her family for generations. She particularly admires Six-Great, who worked with an entire pack of living dogs and ghost dogs. Suddenly, Kirby races through a wall, clearly disturbed—an ominous sign. Later, Ellie learns that her cousin Trevor has been in a car accident and likely won’t survive. That night, Trevor visits Ellie in a dream to tell her that a man named Abe Allerton from Willowbee, Texas murdered him. He begs Ellie to protect his family before he dies, which causes the dream to end.
When Ellie wakes in the morning, she learns that Trevor has died. Her mom, Vivian, has already flown to Allerton to help Trevor’s widow, Lenore, and baby son, Gregory. Dad is planning to drive to Allerton so Mom will have the family van, and he agrees to let Ellie join him—and he believes Ellie’s account of her dream and how Trevor died. In the next few days before they leave, Ellie hangs out with her best friend, Jay, and his sister Ronnie’s boyfriend, the vampire Al. Al proposes to Ronnie, though Ronnie doesn’t see his graffitied proposal until days later, at which point she accepts.
Since Ellie is interested in raising something prehistoric from the dead (inspired by her grandmother, whose closest ghostly companion is a woolly mammoth), Dad agrees to stop at a rock shop on their way to McAllen so Ellie can purchase a trilobite fossil. Ellie and Dad arrive at Lenore’s house late at night. Lenore is distraught and, after giving Ellie Trevor’s Swiss Army knife, she begs Ellie to raise Trevor from the dead. This would be very bad; human ghosts are universally violent and destructive, so Ellie refuses. Later, Ellie wakes the trilobite’s ghost.
The coroner declares Trevor’s death an accident the next day, which doesn’t surprise Ellie. Abe Allerton attends Trevor’s public wake and asks Ellie where Trevor’s body is buried, as his son, Trevor’s former student Brett, would like to visit it. But per Lipan tradition, Trevor’s burial site is a secret—and Ellie suspects Dr. Allerton has ulterior motives for visiting the grave. The following day, a celebrity psychic named Chloe Alamor agrees to visit the spot where Trevor’s body was found to do a reading. Neither Ellie nor Lenore believe she’s genuine, though, so Ellie becomes even more intent on solving the mystery herself.
Jay agrees to visit Ellie with his psychic Aunt Bell (as they’re descended from fairies, they can use fairy rings to travel long distances quickly). Aunt Bell confirms that Trevor didn’t die where his body was found—and she, Jay, and Ellie discover the spot where he did die. Per her reading, he was attacked after finding another injured person, perhaps Dr. Allerton, and offering to call 911.
Over the next few days, Ellie (with Jay’s and Vivian’s help) investigates. In Trevor’s boxed teaching materials, she finds Brett’s essay on Nathaniel Grace, the founder of Willowbee who established hospitals and seemed to have preyed on Native people. The following morning, Ellie goes to the park and wakes the trilobite’s ghost—and she accidentally finds herself and Kirby swimming in a vast ocean, which is the ocean of the dead. She’s able to return home, and Vivian implores Ellie to not call the dead again until she can speak with an elder.
When Lenore goes missing one night, Vivian and Ellie drive to the Allerton mansion—where they come face to face with dozens of vampires. Ellie and Jay visit Willowbee, which is gearing up for its bicentennial celebration with an exhibit at the library. Though the exhibit is thorough, many aspects of the town’s history don’t make sense. Ellie and Jay also visit the Willowbee clinic, which is shockingly normal.
Finally, Ellie meets with Dan, a tribal elder, about her trip to the underworld. He insists to Vivian that it’s time to tell Ellie how Six-Great died. Ellie doesn’t want to hear this story, so, following Dan’s departure, she shares with Lenore and Vivian what she and Jay have discovered: that Dr. Allerton can move injuries from one body to another. Dr. Allerton was in a car crash, and he transferred his injuries to Trevor when Trevor stopped to help.
Despite Ellie’s protests, Vivian shares how Six-Great died: after avenging her husband’s murder, she continued to grieve and eventually went to the underworld to try to appease her husband’s soul. She never returned. That night, Ellie dreams about Trevor again. In the dream, Gregory crawls to Trevor and touches his hand. This will disconnect Trevor from the underworld and allow him to return to Earth as a ghost, and the dream version of Trevor ominously threatens attendees at the bicentennial masquerade ball that Dr. Allerton is throwing the following day.
When Ellie wakes up, Gregory snuggled in bed with her, it confirms that her dream was real and that Trevor’s ghost is back. Ronnie calls to share that Al, who tried to investigate the vampires at the Allerton mansion, has disappeared—and Vivian learns that Trevor’s grave has been robbed. Vivian and Ellie pick up Jay, Ronnie, and Ronnie’s three bridesmaids, Jess, Martia, and Alice, and head for the mansion to rescue Al. Vivian, Ronnie, and the bridesmaids enter the mansion first with Kirby, but Trevor’s ghost lures Ellie and Jay into the mansion, too.
Pursued by an old vampire named Glorian, Ellie and Jay discover Al and revive him. They then encounter Trevor’s ghost, who tries to get Ellie to help him get justice for Trevor by tormenting and killing everyone in Willowbee. Ellie refuses, and Kirby helps her evade Trevor’s ghost. She and Jay enter the ballroom just as Trevor’s ghost begins to torment the masquerade’s attendees. Dr. Allerton’s team of exorcists are ultimately able to return Trevor’s ghost to the underworld. But rather than admit defeat, Dr. Allerton insists to Ellie that he’ll keep what happened tonight a secret, just like he and his ancestors have been doing for centuries, since Nathaniel Grace founded Willowbee in Massachusetts 200 years ago. Unwilling to let this happen, Ellie summons all of her ancestors’ dogs and takes Dr. Allerton to the underworld. She plans to leave him to be tormented by the angry souls of his many other victims. He tries to attack Ellie and return to Earth with her, but Kirby protects Ellie. Though Ellie returns to the real world, Kirby doesn’t answer her call anymore.
Months later, Ellie is back at home with Jay and her new dog, Snickers, when Kirby’s ghost reappears—carrying a dog toy like the ones Ellie has heard Six-Great used to make for her dogs.