The speckled band is really a poisonous snake. It was responsible for the death of Julia Stoner, but no one realized at the time that Julia had been bitten by a snake. According to Helen Stoner, Julia came out into the corridor writhing with pain. As she was dying she said:
‘Oh, my God! Helen! It was the band! The speckled band!’ There was something else which she would fain have said, and she stabbed with her finger into the air in the direction of the doctor's room, but a fresh convulsion seized her and choked her words.
Julia was evidently pointing at Dr. Roylott's room to show that he was responsible for sending a poisonous snake into her room to kill her. She was too far gone to be completely coherent. Holmes asks Helen:
“Ah, and what did you gather from this allusion to a band—a speckled band?”
“Sometimes I have thought that it was merely the wild talk of delirium, sometimes that it may have referred to some band of people, perhaps to these very gipsies in the plantation. I do not know whether the spotted handkerchiefs which so many of them wear over their heads might have suggested the strange adjective which she used.”
The important point here is that the author, Arthur Conan Doyle, could not have Julia use the word "snake" because that would have practically given the whole plot away. Julia is delirious. She probably saw the snake but could only come up with a description of it as a "speckled band." Doyle introduces a false clue by having Helen suggest that the term might refer in some way to the band of gipsies who frequent the property. Otherwise, it would be all too obvious that Dr. Roylott had killed Julia and was now trying to kill Helen, both girls for the same reason, that he was legally obligated to pay them a substantial annual sum from their mother's estate if they got married. Julie had become engaged shortly before her death two years earlier, and Helen had only recently become engaged herself. Dr. Roylott had moved Helen into Julia's room next to his on the pretext of having some repairs done to her own room.
When Holmes and Watson spend the night in Helen's room next to Roylott's, they hear a low whistle at around three o'clock in the morning. Holmes immediately lights a match and starts striking at something with his cane.
He had ceased to strike and was gazing up at the ventilator when suddenly there broke from the silence of the night the most horrible cry to which I have ever listened. It swelled up louder and louder, a hoarse yell of pain and fear and anger all mingled in the one dreadful shriek.
Holmes has angered the snake and driven it back through the ventilator. They enter Dr. Roylott's room and find him dead.
Round his brow he had a peculiar yellow band, with brownish speckles, which seemed to be bound tightly round his head. As we entered he made neither sound nor motion.
“The band! the speckled band!” whispered Holmes.,,,“It is a swamp adder!” cried Holmes; “the deadliest snake in India. He has died within ten seconds of being bitten."
"The Adventure of the Speckled Band" is an example of what is called a "Locked Room Murder Mystery." A possible prototype of all such stories is Edgar Allan Poe's "The Murders in the Rue Morgue." The question in such a story is: How could the victim be killed in a room in which the door was locked and all the windows were shut and bolted. The answer in "The Adventure of the Speckled Band" is that Dr. Roylott had trained a snake to crawl through the ventilator and down the dummy bell-rope onto the sleeping girl's bed. He knew that sooner or later the snake would bite her and she would be sure to die. But he had trained the snake to come back through the ventilator when he blew a low whistle, because he did not want Julia or Helen to wake up and find a snake in bed with her. He always recalled the snake at three in the morning in order to be sure that the prospective victim would still be asleep. The snake would have three or four hours in which to bite the sleeping girl if it was going to bite her, but she would have to do something to antagonize it. Julia has apparently been sleeping with a deadly snake for three nights in a row without being bitten. It had probably crawled right under the covers with her for warmth. On the fourth night she must have rolled over in bed to reach for a box of matches and rolled right on top of the snake. That was more or less what Dr. Roylott had expected to happen with Julia sooner or later. The same would have happened to Helen if she hadn't become alarmed by the low whistle on her first night in the room and had fled to London at daybreak in order to consult Sherlock Holmes.