Holmes is engaged by "Wilhelm Gottsreich Sigismond von Ormstein, Grand Duke of Cassel-Felstein, and hereditary King of Bohemia" to retrieve a compromising photograph in the possession of Irene Adler--a photograph showing the King, younger, together with her. Many attempts have been made to acquire the photograph but all have failed.
In an unexpected turn of events, a disguised Holmes, engaging in reconnaissance, is witness to Adler's marriage to Mr. Godfrey Norton. Reasoning that Adler must be hiding the photograph at her home, Holmes devises a scheme to induce her to reveal the location of the photograph, and executes it, further demonstrating his mastery of disguise. Adler, though initially taken in, become suspicious, and flees the country the very next morning, before Holmes can return to retrieve the photograph.
Adler leaves behind a note for Holmes congratulating him on his ruse, and assuring him that she keeps the photograph only as insurance against any interference from the King. The King is satisfied with this turn of events, convinced that Adler is as good as her word.