Sherlock, in the throes of a violent nicotine fit (he swore to quit cold turkey and is not precisely making a rip roaring success of it) and a perfect frenzy of boredom, pines for a case to work upon. After ridiculing an e-mail from a child who asks him to find her "luminous rabbit" named Bluebell, he is visited by Henry Knight, a man whose father was ripped apart by a gigantic hound on Dartmoor twenty years earlier. Henry, then a small child, had fled in terror only to be found in a bewildered state the next morning. After years of not knowing whether he imagined it, Henry has visited the hollow where the killing occurred, and found gigantic paw prints of a dog, prompting his request for help from Sherlock Holmes. Although initially dismissive, Sherlock suddenly becomes interested after being struck by Henry's use of the archaic word "hound". Sherlock agrees to come down to Dartmoor.
Sherlock and John interview the Dartmoor locals at a local vegetarian restaurant and inn and find that the hound has become a local legend with a guide who takes people on treks around the moor. The pair then visits the nearby Baskerville Military Base. Sherlock gains access using an ID card taken from Mycroft Holmes. They are introduced to various officials in the base: Commander Major Barrymore, genetic scientist Dr Jacqui Stapleton and Dr Bob Frankland. Sherlock deduces that Dr Stapleton is the mother of the little child who contacted him about Bluebell. When their credentials finally cause a security alert, Dr Frankland vouches Sherlock's identity as Mycroft, despite knowing Sherlock's real identity. Frankland intimates that he was a friend of Henry's father and displays a considerable concern about his well-being.
Later on that night, Sherlock and John visit Henry Knight, who tells them about the words "Liberty" and "In" he sees in his dreams. Sherlock convinces Henry to visit the moor in the hope of confronting the beast. Along the way, John gets distracted and follows his own path where he notices what seems to be a Morse-code signal. Meanwhile, Sherlock and Henry arrive at the center of the hollow, where they suddenly hear growling. John finally arrives at the top of the hollow just as Henry sees the beast and panics. The three of them leave in a hurry, Sherlock claiming to have not seen anything.
That night, at the inn, Sherlock is visibly shaken and he confesses that he actually saw the hound. John pursues the Morse-like signals, which turn out to be unrelated headlight flashes. On his way back, Sherlock asks John to interview Henry's therapist, Dr Louise Mortimer. During the interview, Dr Frankland drops by and blows John's cover, revealing him to be Sherlock's assistant, which causes Mortimer to leave. Meanwhile, in his house Henry Knight appears to hallucinate about the hound.
In the morning, Sherlock suggests that "hound" might not be a name, but an acronym. He also claims that the dog he saw was not just large and black with red eyes, but also emitting a sort of eerie glow. The pair run into DI Greg Lestrade who was sent to Dartmoor by Mycroft to keep an eye on Sherlock. They interrogate the innkeepers, Gary and Billy about a copious order for meat which John has spotted, which struck him as odd for a vegetarian restaurant. The proprietors own up to keeping a dog on the moor to boost the tourist trade, but assure they have had it killed because it was uncontrollable. This satisfies Greg but not Sherlock who assures that the dog he saw was monstrous.
Placing a call to Mycroft, Sherlock gains access to Baskerville for 24 hours despite Major Barrymore's anger. In the lower levels of the facility, John investigates the genetics labs where he observes various cages for test animals and a few leaking gas pipes in a confined chamber. As he leaves the chamber, he is stunned by a glaring light and a screeching siren. Trying to leave the lab, he finds his pass-card access denied. He hears a growling sound and immediately assumes that it is the hound. Locking himself in one of the empty cages, he calls Sherlock who asks him to describe what he sees. Rendered speechless from horror, John is eventually rescued by Sherlock. Sherlock asks him what he saw, and John claims that the dog he saw was exactly how Sherlock had described earlier, glowing.
They confront Dr Stapleton, who admits that genetic mutation experiments were conducted on animals. Sherlock now believes that the hound was a manifestation of a drug that causes hallucinations, contained in Henry Knight's sugar bowl, but analysis of the sugar reveals nothing. Using the method of loci ("mind palace"), Sherlock reaches the conclusion that the words 'Liberty' and 'In' seen by Henry in his dreams stand for Liberty, Indiana. Taking the geneticist into their confidence, Sherlock and John try to access the confidential files in the Baskerville database, only to be stumped by a CIA database password, only accessible by Major Barrymore. After observing the commander's office, Sherlock deduces Barrymore's password and accesses the database. "H.O.U.N.D" is revealed to be a secret military project aimed at creating a chemical weapon that triggers violent hallucinations in the brain. Looking at a photograph of the scientists involved in the project, Sherlock realises that Dr Frankland was involved with the project. At that moment, John receives a phone call from Dr Mortimer who tells him that a rampaging Henry broke into her room with a pistol and then ran away.
Assuming that Henry went to the hollow where his father died, Sherlock summons Greg and they rush to the scene. They find a delirious Henry Knight, about to commit suicide. Sherlock talks him out of it, explaining that the hound was just a hallucination and that his father was attacked by Frankland, wearing a gas mask with red-coloured lenses and a jersey with "Hound. Liberty, In" written on it. Henry's memories were subdued due to the trauma but as he began to remember the incident, he had to be silenced as well. As another murder would arouse suspicion, Frankland decided that driving Henry insane and therefore casting doubt upon his story would be a better option. With pressure pads installed around the hollow which released a dose of the chemical compound, each time Henry attempted to face his fears he would be pushed further into madness. As Henry calms down, they all hear the howling of a hound, which had not been killed but simply abandoned by the innkeepers and now appears at the edge of the hollow. In a fit of terror, Sherlock sees the image of Jim Moriarty descending upon him. As he grapples with the phantom criminal, it turns into Dr Frankland who desperately shouts for them to kill the advancing hound. The hound leaps upon the party, only to be shot down by Greg and John. Henry flies into a vengeful rage and attempts to throttle Frankland but the doctor runs away. After a brief chase, he runs into the Baskerville mine field and is blown up.
The next day, Sherlock and John are having coffee, discussing the case. John is confused as to why he saw the hound in the lab despite not having inhaled the gas from the Moor. Sherlock tries to explain that the pipes in the lab must have been leaking the gas, but John correctly guesses that Sherlock was the one who locked him in the lab as an experiment.
In the last scene of the episode, Mycroft orders the release of Moriarty from a government facility in which Moriarty has written Sherlock's name all over the walls.