In the Mojave Desert in 1982, a man named Nix has gathered a cult in an isolated house, where he plans to sacrifice a young girl that he has kidnapped. Nix calls himself "The Puritan" and has the ability to use real magic. A group of former cult members, including Swann and Quaid, arrive to stop him. After the initial confrontation with the cultists, Nix's assistant, Butterfield, escapes and Swann is attacked magically by Nix. The kidnapped girl shoots Nix through the heart with Swann's gun. Swann fastens an ironwork mask over Nix's head, who appears to die and declares that they will bury Nix so deep that no one will ever find him.
Thirteen years later, New York City private detective Harry D'Amour is investigating a case in Los Angeles. D'Amour has a long-standing interest in the occult and has some renown from his involvement with a recent exorcism. During the investigation, D'Amour discovers a fortune teller shop owned by Quaid, where he is relentlessly attacked by a man with unusual strength. D'Amour finds Quaid suffering from multiple stab wounds. As he dies, Quaid warns D'Amour that "The Puritan" is coming.
Swann, now a famous stage illusionist, lives in a Beverly Hills mansion with his wife, Dorothea. When informed that Nix's followers have murdered Quaid, Dorothea suggests they hire D'Amour to investigate the murder. D'Amour agrees, and she invites him to Swann's magic show. Swann performs a new death-defying illusion which goes wrong, and he is killed on stage.
D'Amour goes to the Magic Castle, where he hears Nix being described as a legend and that Nix was believed to have taught Swann. After getting into the Repository, a special room in the Magic Castle that supposedly contains every magic secret known to man, he discovers that Swann's "illusions" involved real magic.
Later, at Swann's house, Dorothea reveals that she was the girl that Nix kidnapped, and that she married Swann because of a sense of obligation. Dorothea and D'Amour make love; afterwards, D'Amour is attacked by a man engulfed in fire. Suspecting a ruse, D'Amour opens Swann's coffin and finds that the body inside is fake. Valentin, Swann's assistant, explains that he helped Swann fake his death. D'Amour agrees to allow Valentin and Swann's ruse to continue. At the funeral, D'Amour follows a suspicious looking man who turns out to be Swann, who, in jealousy, attacks D'Amour with magic. D'Amour convinces the emotionally hurt Swann to help him put an end to Nix's cult.