A Study in Scarlet begins with Dr. John Watson, the narrator, settling in London to recover from a wound and illness he sustained while acting as a military doctor during the Second Afghan War. One day he runs into an acquaintance, Stamford, while at a bar. Watson confides in his friend that he needs a new living arrangement, as his previous one was too expensive. Stamford responds that another friend of his has also expressed this desire, and takes Watson to the university laboratory where his friend –Sherlock Holmes –is working on an experiment.
Stamford gives some background information on Holmes, such as the fact that his true profession is unknown, that he is eccentric and brilliant, and that his knowledge is specialized but diverse. After discussing their personal idiosyncrasies, Holmes and Watson decide to live together. Watson watches the enigmatic Holmes and notes his strange behavior and interests. The living arrangement proves itself pleasant for both men.
One morning Watson notices an article about the art of deduction based on observation. The tiniest detail can yield a multiplicity of information. Watson scoffs at this theory, but is surprised to learn that Holmes was the article's author. Holmes explains that he is a consulting detective; his powers of rational, reasoned observation and deduction allow him to help clients and even solve crimes. He laments that there have been very few good cases of late.
However, a good case soon drops in his lap when he is asked by Scotland Yard detective Gregson to assist him in solving a crime just recently committed. Holmes asks Watson to accompany him and they travel to an empty house in a London neighborhood. There they observe a crime scene that includes cab prints in the street and footprints in the yard, a dead man who has been poisoned but not robbed laid out in a room, and the word RACHE (the German word for revenge) in blood on the wall. A woman's wedding ring falls off of the body when it is lifted. The dead man's name is Enoch Drebber, and he was from Cleveland. There was a note to his secretary, Joseph Stangerson.
Over the next couple of days Watson watched more pieces of the puzzle fall into place for Holmes. He informed Watson how he determined the murderer's age and height from his observations, as well as his complexion. An interview with the constable on duty that night revealed that a drunken man in the street was actually probably the murderer returned for the ring. In the middle of the investigation, another Scotland Yard detective on the case named Lestrade, whom Holmes respected, bursts into the Holmes’ and Watson’s apartment announcing that Stangerson had also been killed. This turned out to be a result of a stabbing, not poison. In Stangerson's room was a box of the pills that Holmes identified as the method of death for Drebber. With this piece of information Holmes excitedly announces that his investigation is complete. Moments later, a cab driver that Holmes called for arrived to pick him up. Holmes burst out that this man, Jefferson Hope, is the murderer of Drebber and Stangerson. With the help of Watson and the detectives, the man was subdued. This is the end of part one.
Part two begins with a vivid description of the wild, isolated, and dangerous great American desert. There were two travelers struggling to survive after the deaths of their companions –the tall and gaunt John Ferrier, and his tiny and lovely adopted daughter Lucy. They were rescued from starvation by a massive caravan –the Latter Day Saints on their exodus. Their leader Brigham Young allowed Ferrier to travel with them if he converts; the latter agreed. The caravan continued to Utah.
The subsequent years saw the population and wealth of the Mormons' chosen site of Salt Lake City explode. Ferrier grew prosperous amongst the Mormons, but refused to marry. Lucy grew up beautiful and independent. One day she was saved from near death in a herd of stampeding cattle by the handsome, solitary, and industrious hunter/miner Jefferson Hope. The two fell in love and Ferrier gave them his permission to marry when Hope returned from a few months' journey.
This was unacceptable to Brigham Young, who personally visited Ferrier and commanded Lucy to marry one of the sons of the Elders, Enoch Drebber or Joseph Stangerson. He gave Ferrier a month for her to decide. Young's behavior was typical of the manner in which the Mormons had been conducting themselves; they were once persecuted but had now turned persecutors. Their community was secretive, violent, controlling, and exclusive. Ferrier had long hated the Mormons and promised his daughter she would not have to marry either of the sons and that they could escape.
Drebber and Stangerson arrogantly visited Ferrier's house to talk to him about Lucy, but he threw them out. This egregious act of disrespect increased the surveillance and threats levied upon Ferrier and his daughter. Finally, the night before the month was up, Jefferson Hope arrived at their home in the middle of the night and the three escaped into the mountains. Unfortunately, when Hope went off to hunt game to feed to famished escapees, he returned to an empty campsite –Ferrier had been murdered and Lucy abducted for marriage.
Hope made his way back down to Salt Lake City and learned that Lucy had been married to Drebber a few days before. Within a month she died from heartsickness. Hope swore that he would spend his life exacting revenge for the murders (he deemed Lucy's death a virtual murder). Taking her wedding ring off her dead finger before she was buried, Hope fled Utah to concoct a plan and raise money.
He tracked Drebber and Stangerson all over Europe. The two men had been part of a fringe group of Mormons that had broken away. They were also aware that Hope had been dogging their steps for many years, and always managed to be a step ahead of him. Hope finally learned they were in London and set in motion his plan to murder them.
At this point the narrative returns to Holmes, Watson, the detectives, and their detainee. Hope was taken to the police station but asks to tell his tale because he would not be going to be able to have a trial or go to prison. The men learned this was because Hope had an aortic aneurism that could burst any day. He was allowed to finish his narrative.
Hope explained how he got a job as a cab driver and tracked Drebber and Stangerson. He caught Drebber drunk one night and killed him with poison. He tried to do the same with Stangerson but had to stab him in self-defense when the latter fought back. He remained driving the cab for a few days so as to not appear suspicious. The next day Hope was discovered dead of the aneurism, a peaceful smile upon his face.
Holmes spoke with Watson about his ability to reason backwards; this method helped him solve the case. He further elucidated the ways in which he figured out certain aspects of the case, especially that it was about a woman. The novel ends with Holmes and Watson reading a newspaper article about the end of the investigation; it only mentions Holmes as an amateur detective who helped but gave primary credit to Lestrade and Gregson.