After our narrator Dr. John Watson gets married (to Mary Morstan, in Conan Doyle's second Sherlock Holmes novel, The Sign of Four) he doesn't see Holmes quite as often as he used to. As Watson sets up a happy home with his wife, Holmes remains as weird as ever, hanging around their old place in Baker Street and alternating between cocaine and criminal cases.

Watson happens to be passing his former apartment on the walk back from his medical practice one evening, and decides to stop in to see his old pal Holmes. The two bat jokes back and forth about Holmes's deductive ability. Holmes finally comes out and asks if Watson can even recall the number of stairs that lead up to the 221B Baker Street apartment, and Watson admits that he cannot. "Ah ha!" crows Holmes: proof that, while Watson sees the same things that Holmes does, he fails to observe them.

A new client arrives to meet Holmes and, after trying to hide his identity for about two seconds, comes clean: he is Wilhelm Gottsreich Sigismond von Ormstein, Grand Duke of Cassel-Felstein and hereditary King of Bohemia (whoa, that's a lot of letters for one name! Bohemia, by the way, is now part of the modern-day Czech Republic). His problem is that he's about to marry the daughter of the King of Scandinavia. The thing is, though, she's from a family with very strict morals, and she wouldn't be pleased to know that he had a serious affair with another woman before their engagement.

This woman is Irene Adler – who lives on in Holmes's memory as thewoman. She's a singer who met the King in Warsaw, where they subsequently had a bit of a fling. Unfortunately, the King allowed himself to be photographed with Adler, and she has the picture. The King wants Holmes to recover the incriminating photo. Holmes agrees.

Holmes then puts on a disguise and goes to Irene Adler's current house in London to stake it out. He finds out that she gets frequent calls from a lawyer, Godfrey Norton. Holmes even happens to be on the site when Adler rushes out of her house to meet Norton at a small church and – get this – our detective is actually called upon (still in disguise) to be the witness for her marriage to the guy. After their surprise elopement, Adler goes back to her house, and Holmes realizes he has to hurry to get the photo back before she has a chance to leave with her new husband.

Holmes comes up with the perfect plan for finding the photo: he disguises himself as a clergyman, stages a riot outside her house, pretends to be injured, and is carried into her living room for medical treatment. Meanwhile, Watson, waiting outside, throws a smoke bomb into her house through the open living room window. In a moment's panic, Adler runs for a small hidden compartment in the wall, where, Holmes guesses, she keeps the photograph. At this discovery, and amidst the confusion, Holmes takes off with Watson in tow. The two wind up back at Holmes's apartment building. As Holmes is looking for his key, a young man walks by and greets him by name, with a cheery "Good evening."

The next morning, the King of Bohemia arrives at Holmes's apartment, where Holmes and Watson are waiting. All three head off to Adler's house. To Holmes's surprise, an elderly woman is expecting them. She hands Holmes a letter signed by Irene Adler and addressed to Holmes himself.

Adler's letter tells Holmes that she had been warned that he was on her trail. Even so, she didn't recognize him immediately when she saw him disguised as such a kindly-looking old priest. But she guessed that it was Holmes when she realized the smoke bomb was a fake fire alarm. Adler then confirmed Holmes's identity by putting on men's clothes (she was once an actress), following him to his home, and greeting him by name. Adler tells Holmes she's keeping the photos as collateral against the King should he ever decide to ruin her reputation. But for now, she's content to live with her new, much worthier husband, and she considers the matter finished.

The King is satisfied with this news, even though Holmes apologizes for failing to recover the photo. Holmes then asks the King if he can keep the photograph of Adler alone that accompanied the letter. The King, surprised, agrees. Watson finishes the story by adding that, while Holmes used to joke about women's intelligence, he hasn't been cracking wise lately: Adler will always be, for Holmes, the ultimate woman.