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 the woman. 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.