Holmes' client is Helen Stoner, a 32-year-old spinster who lives with her stepfather: Dr. Grimesby Roylott of Stoke Moran. Dr Roylott is the last survivor of what was a wealthy but dissolute and violent tempered aristocratic Anglo-Saxon family of Surrey. After returning from India where he had a large medical practice and had served a jail sentence for killing his native Butler in a fit of rage, Roylott—a widower—settles with his two stepdaughters in the broken-down ancestral manor-all that is left of estates that had extended into Berkshire and Hampshire. The doctor becomes notorious for terrorizing the local village because of his quarrelsome personality and violent temper. Dr. Roylott has required Miss Stoner, who is engaged to be married, to move into a particular bedroom of his heavily mortgaged ancestral home in Stoke Moran. This room was the one in which two years before, Helen's twin sister Julia had died under mysterious and dramatic circumstances—uttering the last words "The band! The speckled band!"—just prior to her wedding. Helen is reluctant to sleep in the room because a number of things about the bedroom are mysterious and disturbing. Late at night, Helen hears low whistling sounds followed by a metallic clang. There is a strange bell cord over the bed but it does not appear to work any bell. The rope goes to a ventilator—an opening high in the wall of the room, close to the ceiling—which provides air circulation between Helen's room and an adjacent room of Dr Roylott in the crumbling mansion. In addition, Helen's bed is clamped to the floor; this piece of furniture can never be moved from its position. Stoner surmises that Julia might have been murdered by the gypsies who wear speckled handkerchiefs around their necks, in order to bring in a bit of cash. Dr. Roylott has rented spare rooms in Stoke Moran near them. A cheetah and a baboon also have the run of the property, for Dr. Roylott keeps exotic pets from India.
After Helen leaves, Dr. Roylott comes to visit Holmes, having traced his stepdaughter. He demands to know what Helen has said to Holmes, but Holmes refuses to say. Dr. Roylott bends an iron fireplace poker into a curve in an attempt to intimidate Holmes, but Holmes is unaffected as he attempts to make small talk during the encounter. After Roylott leaves, Holmes straightens the poker out again. Holmes research of the late wife's will finds that she had arranged for Roylott to receive an annuity which had been £ 1,100 GBP but now totals £ 750 GBP, with the provision that the daughters can each claim 1/3 of the annuity (£ 250 GBP) upon marriage. If both or even one daughter were to marry and claim the annuity due her, this would seriously pauperize Roylott financially; thus the doctor has motive for neither daughter to marry.
Having arranged for Helen to spend the night in another bedroom, Holmes and Watson sneak into her bedroom without Dr. Roylott's knowledge. Holmes says that he has already deduced the solution to the mystery, and the test of his theory turns out to be successful. They hear the whistle, and Holmes also sees what the bell cord is really for, although Watson does not. Julia's last words about a "speckled band" were in fact describing "a swamp adder, the deadliest snake in India". The adjacent room was occupied by Dr. Roylott and a safe containing the venomous snake, and the ventilator and bell cord were bridges for the snake to land on the bed. After the swamp adder bit Julia, he called off the snake with the whistling, which made the snake climb up through the bell cord, disappearing from the scene.
Now the swamp adder is sent again through the ventilator by Dr. Roylott to kill Julia's sister Helen. Holmes attacks the snake with a walking stick, sending it through the hole in the wall back toward its home in the physician's room. A shriek is heard, and the annoyed reptile is soon found to have injected its venom into the murderous physician. When Holmes and Watson enter the death scene, the swamp adder has wound its body around the head of its victim in triumph. Holmes replaces the reptile into the safe. A coroner's jury finds that Dr. Roylott came to his death due to indiscreet handling of a dangerous pet. Holmes grimly notes that he is indirectly responsible for Dr. Roylott's death, but that he is unlikely to feel much guilt over the chain of events that led to his departure from this world.