The film begins at Space Station Minos in the year 2127. Paul Merchant, the man who built the station, has a robot solve the Lament Configuration (the robot is subsequently destroyed); however, several guards led by Rimmer capture Paul. Paul tells Rimmer the story of his bloodline.
A flashback is shown to around 400 years ago. Philip Lemarchand, a French toymaker, makes the Lament Configuration for a wealthy aristrocrat named Duc de L'Isle, who is obsessed with dark magic. He and his apprentice, Jacques, kill a woman and use her to summon the Cenobite slave Angelique. However, Angelique and Jacques betray and kill de L'Isle. Lemarchand, in the process of inventing a design (the Elysium Configuration) to destroy the demons, attempts to steal back the box but is discovered. Jacques callously informs the toymaker that he and his bloodline are cursed until the end of time because of the box he created, before ordering Angelique to kill him. However, his wife survives.
Around 200 years later, John Merchant has built the building witnessed at the end of Hellraiser III: Hell On Earth Upon realizing that the Merchant bloodline has survived, Angelique informs Jacques that she wishes to go to America. However, Jacques denies her permission, upon which Angelique kills him for "trying to stand in Hell's way". Angelique then makes a failed attempt to seduce John at the grand opening in New York, only to be rebuffed when Merchant vaguely recognizes her from his nightmares. She finds the Lament Configuration in a cement pillar in the basement and seduces a party guest into solving it; he is killed when the dimensional breach breaks through the wall and Pinhead arrives. Angelique is perturbed by Pinhead's appearance, and the reunion informs her that Hell has revised its ideological foundations, and is no longer the place she once knew. Upon seeing the building, Pinhead intends to use the basement to establish a permanent gateway between Hell and Earth, and succeed in his previous attempt to conquer Earth. Angelique initially cooperates, using her wiles and Merchant's memories to solicit his compliance, but Pinhead is impatient and infuriated by her methods, and kidnaps Merchant's wife and son to force the issue. Having grown accustomed to a decadent life on Earth, Angelique decides she wants no part of Hell's new fanatical austerity, and intends to force Merchant to activate the Elysium Configuration and destroy Hell, thus freeing her. But the process is incomplete and the attempt fails; Pinhead kills Merchant before his wife solves the box and forces Pinhead back to Hell, taking Angelique with him.
Returning to 2127, Rimmer has Paul locked up, and the Cenobites trick the guards into releasing them from their holding cell; upon learning of Merchant's intentions, they kill the entire security team until only Rimmer and Merchant remain. Rimmer releases Paul, who has a plan to destroy the Cenobites (and built Minos for that specific reason).
Paul distracts Pinhead with a hologram while he gets on the shuttle with Rimmer, and activates the Elysium Configuration. A series of powerful lasers and mirrors create a field of perpetual light, while the station transforms and folds around the light to create a massive box. The light is trapped within the box, which then self-destructs, destroying the Cenobites.