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 remove her skin. L'Isle uses dark magic with the Lament Configuration to summon a demon princess named Angelique to inhabit the woman's skin. She is theirs to command unless they stand in Hell's way. 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 from the last scene of Hellraiser III. Upon realizing that the Merchant bloodline has survived, Angelique turns on Jacques and mutilates him, killing him for "standing in Hell's way" and attempts to seduce John. She finds the Lament Configuration in a cement pillar in the basement and makes a man solve it, and he is killed by Pinhead.
Pinhead wants to make John use the Elysium Configuration to keep the gateway to Hell open so he can come and go as he pleases. After turning two twin security guards into a two-headed Cenobite, Pinhead tells Angelique that the best way to make John go along with their plans is to threaten his child, Jack. He gets John to use the Elysium Configuration, but it does not work, so Pinhead kills John. John's wife, Bobbi, sends Pinhead, Angelique, and a beastly demon called Chatter Beast back to Hell.
Returning to the present, in 2127, Rimmer has Paul locked up. However, he has already summoned the demons: Pinhead, Angelique (now a Cenobite), the Twin Cenobite, and Chatter Beast. One by one, the guards are picked off by Cenobites. Parker is killed by Pinhead, Carducci by Angelique, Chamberlain by Chatter Beast, and Edwards by Twin Cenobite. Rimmer releases Paul, who has a plan to destroy the Cenobites (and built Minos for that specific reason). Rimmer escapes to a space shuttle, and kills Chatter Beast by raising the pressure in a hallway.
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 and severing the connection between Hell and Earth forever.