Kate Peters, an aspiring actress, spends a carefree September evening flying through her backyard on a pulley system invented by her uncle George Melvil, a slight, bespectacled boy two years her junior. Kate and her mother, June, live in one half of a gray-shingled duplex; George and his parents, Ma and Pa Melvil, live in the other. Kate is preparing for the lead role of Peter Pan in the Lincoln Middle School fall musical, but her plans collapse when both she and George receive acceptance letters to the Whittaker Magnet School, an experimental charter school housed in the basement of the massive Whittaker Library Building downtown. Kate refuses to go, but George discovers that the district's boundaries have been redrawn to swallow their block. Kate no longer has a choice.
At orientation, the family meets the school's imposing figures: Cornelia Whittaker-Austin, granddaughter of the library's founder, who humiliates Kate by calling her a "ragamuffin" who only got in because she lives at George's address; Cornelia's son, Whit; her daughter, Heidi; and Dr. J. Kendall Austin, Cornelia's husband and the school's headmaster, a tiny, supremely confident man who hides his short stature behind a blue shower curtain. Because the family cannot afford tuition, they sign work contracts: Ma and Pa do custodial labor, June takes a clerical position, Kate becomes Heidi's personal assistant, and George helps with the after-school program.
School life proves oppressive. Students take standardized tests in every class, every day, seated in rows ranked by score. Kate sits last in every room; George sits first. Dr. Austin fires teachers for minor infractions. Mrs. Hodges, a severe librarian in black, forces students to drink herbal supplements and subjects Kate to a treadmill to reach "alpha brain wave time" before testing. Kate dubs her classmates the "Mushroom Children" for their greenish pallor under the basement's fluorescent lights.
Kate's one ally inside the building is Miss Pogorzelski, called Pogo, a silent librarian in an oversized black dress who communicates exclusively through Mother Goose rhymes. After Cornelia falsely blames Kate for a book that Whit actually damaged, Kate is punished with trash duty alongside Pogo, and the two form a bond. Kate also helps rescue a homeless can man whom Cornelia runs over with her Hummer. Pogo then leads Kate through a hidden vent on the roof into a secret room behind the old office of Cornell Whittaker II, the founder's son. The room contains occult texts, Cornell II's diary, and a device called a Holographic Scanner bearing a plaque for Ashley-Nicole Singer-Wright, a former student prodigy whose test scores brought the school national attention. Two books sit atop the scanner:
The Three Billy Goats Gruff and an antique
Perrault's Mother Goose.
Kate visits Mrs. Brennan, the grandmother of her best friend, Molly, and the former director of Library Services. Mrs. Brennan explains that both Cornell Whittaker I and his son were practicing spiritualists, believers in the idea that the dead can be contacted on another plane of existence. Cornell II spent a fortune collecting occult books, including the Perrault volume. About 10 years earlier, children and at least one adult were possessed during library events, acting like wild creatures. A Reverend Hodges was brought in to investigate and died under suspicious circumstances in the basement, his death covered up by the county coroner.
The supernatural threat reasserts itself during the first Story Time on the Roof. Pogo places
The Three Billy Goats Gruff on a book cart, but Walter Barnes, a narcoleptic librarian, picks it up instead of the intended target. His eyes blaze as he delivers a spellbinding performance completely unlike his usual self. When he finishes, he collapses and is discovered to be dead. Dr. Austin holds an assembly claiming Barnes was merely drunk and has been fired.
The possessions escalate. Bud Wright, the portly husband of county commission chair Susan Singer-Wright and owner of a failing aquatic park, picks up a book Pogo has placed on a music stand and shoves his head into a tuba. Pogo holds the
Mother Goose in front of his face, and Bud returns to normal. Kate confronts Pogo, realizing she has been placing demon-inhabited books near Kate's enemies, though the wrong people keep getting possessed. Kate makes Pogo promise to stop. When Whit is later possessed during a presentation for Harvard representatives, Dr. Austin finally accepts the truth and summons Ashley-Nicole to destroy the demon.
Pogo is arrested after Mrs. Hodges falls from the eighth-floor railing during a struggle over the
Mother Goose envelope. The can man refuses to sign a false statement and is jailed alongside her. George overhears the conspiracy from a hiding place on the second floor.
June then reveals the truth to Kate, George, Molly, and Mrs. Brennan. Ten years earlier, during a Toddler Time session, toddler Kate handed June a copy of
Peter Pan and said, "You read it, Mommy." June was possessed instantly, swinging from a chandelier until a fireman pulled her down. The incident cost Kate's absent father, Charley Peters, his job at Technon Industries and his marriage. June confirms the demon is real, whispering the nursery rhyme "Jack and Jill went up the hill," which gives Kate and George a name for the entity.
Ashley-Nicole arrives from MIT and sets up a Laser Cannon in the secret room, aimed at a book cart behind a protective shield. On the morning of the First Lady's visit, Kate and George discover a hidden refrigerator in the basement containing the frozen bodies of Barnes and Mrs. Hodges. Determined to expose the deaths Dr. Austin has concealed, they switch the coolers so the one with the corpses goes to the roof, where it is designated for refreshments.
The visit descends into chaos. Kate, forced to perform as Orchid the Orca, abandons her script and begs the First Lady to "set me free." The Tri-County Cloggers' pounding collapses the wooden stage; LoriBeth Sommers, a student performer, falls through the hole but is caught by William Anderson, Kate's classmate and new neighbor. Cornelia opens the switched cooler and finds the bodies. Mrs. Hodges's reanimated hand grabs her, and the demon Jack transfers into Cornelia. The possessed Cornelia dons Cornell Whittaker II's wizard robes, shaves her head, and returns to the roof to perform a demented Story Time that ends with her mooning the First Lady. Secret Service agents tackle her, and Dr. Austin slides the
Mother Goose under Cornelia's face, forcing the demon back into the book.
In the secret room, Ashley-Nicole fires the Laser Cannon. The beam vaporizes the book. A red bubble rises, the room superheats, and hundreds of ghostly faces swirl through the air: the spirits of everyone the demon has possessed across centuries. The bubble explodes, and Jack is destroyed. However, Dr. Austin and Bud forget to shut off the cannon. Susan Singer-Wright enters the room to smoke a cigarette, and the weapon's tracker kills her instantly. Agent Pflaum, hiding the First Lady in the room, discovers the charred skeleton. The First Lady grabs the agent's dropped revolver and fires repeatedly into the corpse.
Rosetta Turner, the First Lady's chief of staff, drafts a statement omitting guns and ghosts, offering each witness one wish for their silence. June's wish is the broadest: to free Orchid the Orca, release Pogo and the can man, liberate the quarantined homeless, and have the gerrymandered school district reviewed by federal authorities. At the sheriff's department, June reveals to Kate that the can man is Charley Peters, not a teacher abroad but a homeless person collecting cans at the library. After initial fury, June forgives Charley in a moment Mrs. Brennan frames as "Library Forgiveness Day."
Weeks later, Kate and George are back at Lincoln Middle School. George surprises everyone by starring as Peter Pan, revealing hidden singing and dancing talents; Kate plays Wendy Darling. Kate has changed her last name to Melvil, and June has rebuilt her life. On the morning the president visits the Whittaker Building, June opens a safe-deposit box and reveals one final secret: the entity that possessed her was not Jack but Jill, a second demon, still trapped in the
Peter Pan book she grabbed when she fled the library. June and Mrs. Brennan switch envelopes outside the building, substituting the Jill-inhabited book for the one Dr. Austin will read during his Story Time for the president. Kate, George, and June watch him walk toward the building, knowing that when he opens the book and releases the vengeful Jill, his day of reckoning will arrive. Kate takes off running down the hill toward the river, arms outstretched, and begins to sing.