Facing the end of their high school journey, Naomi Nakashima, her lifelong companion Satoshi Mochida, and their friends, including Seiko Shinohara, Yoshiki Kishinuma, Sakutaro Morishige, and Mayu Suzumoto, are busy cleaning up after their last cultural festival. During this time, class representative Ayumi Shinozaki decides to perform an enchanting ritual known as "Sachiko Ever After," using paper slips, with the hope that it will ensure their unbreakable friendship for years to come. The event takes an unexpected turn when their teacher, Yui Shishido, enters with Satoshi's younger sister, Yuka Mochida. As they proceed with the ritual, they are inexplicably transported to a hauntingly altered realm.
They awaken in the abandoned halls of Tenjin Elementary School, which was shuttered due to a series of horrifying murders that transpired years ago. Among the chilling discoveries around them are newspaper articles detailing the tragic fates of children, including Yuki Kanno and Ryou Yoshizawa, alongside a girl in a red dress named Sachiko, who had mysteriously vanished. They learn of a menacing figure, Yoshikazu, wielding a hammer, who brutally kills Yui, sending shockwaves through the group. As panic ensues, Naomi twists her ankle, and shortly after, Seiko vanishes following a heated dispute with Naomi.
The tension escalates as Ayumi and Yoshiki bear witness to the terrifying apparitions of Yuki and Ryou, who gruesomely murder Mayu. In a grave moment, Naomi stumbles upon Seiko's lifeless body, hanged in the shadows of despair. A frenzied Sakutaro meets a grim fate at the hands of Yoshikazu, further deepening the sense of doom enveloping them. Amidst their struggle for survival, Ayumi and Yoshiki manage to unearth a haunting video cassette along with a jar containing severed tongues—belongings of the deceased children. The chilling footage, recorded by the renowned spiritualist Kou Kibiki, displays him alongside his assistant as they delve into the school's sinister past, only to fall prey to the vengeful spirits that dwell within.
In an attempt to escape the tormented place, Kou reveals that they must break the curse of the school, an endeavor that hinges upon recovering their original paper slips. Believing she has misplaced hers, Naomi soon discovers that Ayumi, grappling with jealousy over her closeness to Satoshi, possesses the actual slip. In a deceitful act, Ayumi provides Naomi with a counterfeit version while she burns the real one. However, the situation takes a turn when Ayumi returns Yuki and Ryou their severed tongues, inadvertently restoring their sanity. This pivotal moment allows Yuki to share a vision with Ayumi, unraveling the shocking truth: their true murderer is none other than Sachiko.
Tragedy strikes again when Yuka falls victim to Sachiko's wrath, leading Yoshiki to heroically sacrifice himself to shield his friends. As Naomi grapples with the overwhelming guilt of being responsible for Seiko's demise—revealed through ghostly recordings she views—she finds solace in Seiko's spirit, which extends comfort during her moments of despair. Driven by the need to protect Satoshi from the vengeful spirit of Sachiko, Naomi uncovers a disturbing vision detailing how Sachiko's mother, Yoshie, the school's nurse, met her tragic end at the hands of Takamine, the principal, resulting in a harrowing cycle of violence that began the curse.
In a desperate effort, Naomi, Ayumi, and Satoshi locate Sachiko's hidden remains. In a final confrontation, they plead with Sachiko to cease her violent ways and let go of her abandonment issues. The revelation of a cherished pendant belonging to her mother brings an unexpected change in Sachiko, as she calms down, accepting her mother's embrace and ultimately lifting the burden of the curse that has haunted them all.
As the school crumbles around them, they manage to perform the reverse ritual. Naomi and Ayumi miraculously return to their world, but the horror lingers when they realize they are each holding Satoshi's severed arms. It becomes evident that he had witnessed Ayumi's betrayal, where she handed Naomi a fake slip, and in a selfless act, he took the fake for himself to safeguard Naomi's chances of escape.
In a haunting post-credits scene, Naomi sits quietly in her room, lost in thought as she gazes upon a memento of Sachiko, leaving viewers pondering the lingering effects of their fateful encounter.