Ghost hunter Cyrus Kriticos (F. Murray Abraham) and assistant Dennis Rafkin (Matthew Lillard) lead a team on a mission to capture a spirit, called the Juggernaut, in a junkyard. Several of the men are killed during the ensuing fight, including Cyrus himself. However, the team is able to catch the ghost.
Arthur Kriticos (Tony Shalhoub), a mathematician who is also a widower, is informed by the estate lawyer of his uncle Cyrus, Benjamin Moss (JR Bourne), that he has inherited a mansion. Arthur and his financially insecure family plan to move into this mansion with his two children, Kathy (Shannon Elizabeth) and Bobby (Alec Roberts). Their babysitter/nanny Maggie (Rah Digga) accompanies the family.
Dennis Rafkin, disguised as a power company employee, meets the family and Benjamin as they tour the mansion. The residence is made almost entirely of glass. It contains Latin phrases etched on floors and movable glass walls, along with priceless artefacts. Arthur and his family are eager about inheriting this new home, and while Arthur is discussing financial matters with the attorney, Kathy and Bobby venture off on their own to explore the mansion. After seeing several ghosts in the basement, Dennis frantically runs upstairs to warn Arthur about the home he is about to own. Benjamin assures Arthur that Dennis is crazy and should be ignored. Dennis tells Arthur that there are twelve spirits are imprisoned in the house, held captive by the spells written throughout the residence.
Benjamin Moss is seen sneaking off to collect a valise of money which was intended to be payment. However, upon taking the money, he activates a mechanism set up by Cyrus that seals the entrance and releases the ghosts, one by one. Consequently, Moss encounters one of them, the Angry Princess, and backs up into an open doorway, which snaps shut and slices him in half. Later the existence of ghosts is proven to the skeptical Arthur, when he witnesses an attack on his daughter by the ghost known as the Jackal.
Bobby, the younger of the two children, disappears after getting separated from Maggie and he wanders into the basement. There he encounters several spirits, including the Torso and the Bound Woman. Arthur manages to find Kathy, and the two battle the Jackal. Kalina Oretzia (Embeth Davidtz), a spirit liberator, helps Arthur free Kathy from the Jackal's grip, only to be lost again a few moments later. After this, Arthur's objective is clear - to find his children and leave this house as soon as possible. This becomes problematic for two reasons: only those equipped with special glasses are able to see the ghosts; and the walls continue to shift, making navigation difficult.
Kalina explains that this is not a house - it is a complex machine built by Cyrus, known as the "Ocularis Infernum" (Eye of Hell.) Created by the Devil and powered by the dead, once completed, this demonic device would allow its user to see into the future. To Arthur's horror, he discovers one of the ghosts powering this machine is the spirit of his dead wife, Jean. Kalina goes on to tell Arthur that his children are in grave danger, and the only way to ensure their successful return is to offer his soul in exchange. If Arthur takes his place as the 13th ghost, his sacrifice of pure love would combat all of the evil contained within the machine, thus shutting it down.
Cyrus is revealed to be alive, having faked his death in order to lure Arthur to the house; Kalina turns out to be his secret partner and lover, and knocks Maggie unconscious. Cyrus has orchestrated the previous events, including the abduction of Kathy and Bobby, so that Arthur will become the 13th ghost not to stop the machine, as Kalina had claimed, but to trigger it. Cyrus then turns on Kalina and crushes her between two glass walls, claiming "greatness requires sacrifice."
Arthur and Dennis make another attempt to save Kathy and Bobby with the help of a detached wall. Facing the Hammer, Dennis pushes Arthur into a corner where he is then protected by the wall, sacrificing his own life in the process. After combating the Hammer, Dennis finds himself cornered by the angry spirit and the newly released Juggernaut; he is brutally beaten and dies when the Juggernaut breaks him in half.
Trapped behind the glass, Arthur is visited by Jean's ghost. Then, all the ghosts disappear from the basement, responding to a tape-recorded summons played by Cyrus. Kathy and Bobby have been placed at the center of a set of whirling, razor-sharp rings. Arthur and Cyrus have a violent confrontation , which is interrupted by the sound of Maggie beginning to destroy the machine. Due to this breakdown in equipment, the ghosts are released from their trance. All the ghosts except Jean immediately grab Cyrus, and hurl him into the spinning rings. Dennis' ghost then appears, telling Arthur to go to his kids. Waiting for a break in the razor rings, Arthur jumps to save his children, making the leap without dying. The house's glass walls shatter, releasing the spirits from captivity. A peacful-looking Jean lingers briefly to say goodbye to her family, then departs with the others.
The film ends with a battered Maggie walking through the wreckage yelling, "I quit!"