The year is 1800, and the Emperor of China has ordered his Chief Astrologer to use all means necessary to put a stop to the opium trade. A British smuggler, Roderick Upcott, is thus in for a nasty shock when he visits a merchant who had promised to purchase Upcottís supplies of Indian opium; the Astrologer is waiting for him, having roasted the merchant alive for his crimes. On the wall, Upcott sees a tapestry bearing a dragon identical to Upcottís own tattoo -- but the image changes colour from green to red, becoming the tattooís spectral opposite. The Astrologer allows Upcott to flee; his punishment will be longer-lasting...
The TARDIS materialises in the British Trade Commission, and the Doctor, Jamie and ZoŽ emerge to find the courtyard filled with smoke that smells of incense and gunpowder. The Doctor meets Upcott and discusses local politics with him, while Jamie and ZoŽ investigate a strange stone structure called a ďspirit gateĒ which prevents demons from passing through. Jamie vanishes when he steps through the gate, as does ZoŽ when she demonstrates what happened for the Doctor. Roderick retreats into an opium daze, unable to deal with what heís seen. The Doctor, however, concludes that the spirit gate is an alien teleportation unit, and he returns to the TARDIS, analyses the energy fluctuations around the spirit gate, and links the sensors to the TARDIS navigational system, allowing the gate to send him after Jamie and ZoŽ.
The TARDIS thus materialises exactly 100 years later in the grounds of Fair Destine, the Upcott family estate -- near the very same spirit gate, which Roderick had shipped home from China as a souvenir. His great-grandson, the surgeon Pemberton Upcott, is hosting a party for his close relatives and other guests; amongst the guests are the celebrated medium Celandine Gilbert and her companion Thomas Carnacki, a young student of supernatural phenomena. The Doctor passes himself off as a guest and manages to speak with ZoŽ, who has avoided questions by disguising herself as a temporary maidservant. She has been unable to locate Jamie, and is disgusted when the head butler, Elder-Main, misinterprets the Doctorís ďinterestĒ in her and offers to arrange for them to slip away together for a fee.
After dinner, Carnacki delivers an illustrated talk on the affair of the haunted Cornish spirit lance, and Celandine prepares to channel the spirits for the amusement of the guests. ZoŽ is sceptical of Carnackiís story, but it soon becomes clear that Celandine does possess psychic abilities; soon after she enters a trance, the piano begins playing a tune which hasnít been written yet. The ruddy-faced Colonel Marlowe heckles her demonstration, but falls silent when a heavy cabinet rises on its own and tilts onto its side without a single crystal falling from its shelves. The Colonel goes pale and flees, and moments later, the manorís arboretum -- where Roderick Upcott and his pet Capuchin monkey are buried -- is struck by lightning.
Celandine falls into a trance from which Carnacki is unable to awaken her. The Doctor and ZoŽ visit the arboretum to investigate, and find that Roderickís grave has been blasted open and his body has gone, apparently vaporised. The Doctor deduces that Celandineís performance has set a sequence of events in motion, but before he can theorise further, Carnacki arrives and asks them for help; the Colonel has been found dead in the billiard room, a locked room to which he had the only key. Pembertonís shrewish wife Millicent takes charge of the situation, much to Pembertonís quiet rage, and asks Carnacki to investigate; impressed by the Doctorís intelligence, Carnacki requests his assistance. The Doctor questions Pemberton and learns that the late Colonel had a terrible fear of the supernatural, explaining his rude behaviour during Celandineís demonstration. The Doctor and Carnacki examine the Colonelís body and find a red dragon tattoo emblazoned on his forehead; however, it is no ordinary tattoo, as there does not appear to be any ink embedded in the skin.
The phone lines are dead, a blizzard is moving in -- and as dawn breaks, Pembertonís elderly aunt Arabelle is found dead. Carnacki concludes that the late Roderick has been resurrected and is stalking his descendents, which ZoŽ finds difficult to credit. The Doctor advises her to keep playing the role of the maid in order to learn more, and she thus delivers breakfast to Pembertonís younger brother Thor, an unrepentant lech who summons her from the billiard room but insists that she serve him breakfast in his bedroom. He also insists that she remain in the room while he eats, and tries to show her a book with some terribly interesting pictures in it. The Doctor shows up before things can go too far, and asks how Thor managed to get into the supposedly locked billiard room. Thor admits that he has a copy of the key, but insists that he is not responsible for the Colonelís death. He also confirms the Doctorís suspicions that the Colonel and Arabelle were relatives by blood, not marriage. The Doctor thus advises Thor to be wary; it seems that the killer is targeting the Upcott family line. However, his theory seems disproven when Millicent Upcott is found dead in her bath.
As night falls, Pembertonís house guests panic and try to flee, only to find that the entire estate has been removed from the Earth itself and is floating in the depths of space. As the guests retreat to the houseís great hall in shock, the Doctor and Carnacki examine Millicentís body and find certain significant discrepancies. Unlike the other two victims, her tattoo was indeed inked in, and a closer examination of the body reveals a tiny bruise and pinprick on the inside of her elbow, indicating that somebody administered an opium overdose to her. Carnacki and the Doctor thus have the furious Pemberton locked up in the wine cellar, near the familyís fireworks store, until the police can be summoned; later, Carnacki searches Pembertonís study and finds the murder weapon. But while this one murder was entirely natural, other forces are still at work on the estate. In exchange for his temporary freedom, Pemberton confesses to the murder of his wife; he had also realised that the curse was striking down his blood relatives, and couldnít bear the thought of his shrewish wife surviving him.
Thor sends ZoŽ a five-pound note and an ďinvitationĒ to join him in his bedroom. She burns both and sleeps soundly in the servantsí quarters, and during the night, Thor is killed like the others. The Doctor studies the scene and determines that the mirror in Thorís bedroom is a one-way glass. Elder-Main reluctantly admits that Thor sometimes invited him to sit in the alcove behind the mirror and watch as Thor entertained himself with the servants. Elder-Main was there last night, waiting for ZoŽ to arrive, but instead he saw Thor being killed -- by Celandine Gilbert.
Carnacki refuses to believe Elder-Mainís story, and insists that he was drunk, lying, or both. The Doctor suggests that Celandine may not be responsible for her actions if she was possessed by a supernatural force, but Carnacki will hear none of it. With the Doctorís help, Carnacki constructs a device capable of locating any nearby sources of spiritual energy, and after some fine-tuning by the Doctor, it pinpoints the spirit gate as the source of the disturbances. The Doctor orders Elder-Main to fetch fireworks from the cellars and pile them around the spirit gate; it has already proven to be a matter transporter, and perhaps it is also acting as a conduit for the energies powering the strange events they have witnessed.
Elder-Main reports seeing Celandine sleepwalking towards the arboretum, and the Doctor, ZoŽ and Carnacki investigate -- and find Jamie lying in the arboretum, deep in a laudanum-induced trance and surrounded by poppies growing more quickly than is natural. Celandine enters the arboretum and kisses Jamie on the forehead, but unlike her other kisses, this one brings life, reviving Jamie from his trance. Celandine has been possessed by the spirit of the poppy, an impersonal natural force which can be turned to either good or evil; the Chief Astrologerís curse is being enacted throughout the plant with which Roderick Upcott caused such suffering in China. Having allowed the Upcotts to profit from their evil, the curse will now strike and take it all away, thus increasing their suffering.
The spirit releases Celandine, its work done -- but Pemberton Upcott arrives, still alive, and holds them at gunpoint. He confesses that he drugged Jamie when the young man first arrived, realising that the arrival of a young man from another century meant that the curse Roderick had written about was about to be fulfilled, but unsure whether it would be safer to kill Jamie or let him live. He now forces the others to the edge of the estate, intending to force them into the void so none will know of his own crime. However, the final stage of the curse then manifests itself; as Carnacki had assumed from the start, Roderick Upcottís cadaver has indeed been animated, and it is he who will kill his own descendent.
Terrified, Pemberton backs away from the approaching Roderick and falls into the void. The dragon tattoo on Roderickís body then comes to life, swelling to an enormous size and attacking the others; it seems that the curse, having dealt with the Upcotts, is now going to kill everyone else in the household. However, the Doctor sends a signal to Elder-Main, who lights the fireworks and blows up the spirit gate. When the gate is destroyed, the dragon crumbles to ash, and Fair Destine returns to the normal world. The surviving houseguests congratulate Carnacki and Celandine on their success, and the Doctor, Jamie and ZoŽ slip back to the TARDIS and depart.