The Adventure of the Dancing Men

[2] Holmes's solution to the riddle of the dancing men rests on reasoning that closely resembles that of Legrand in Poe's "The Gold Bug."

[3] The story begins when Hilton Cubitt of Ridling Thorpe Manor in Norfolk visits Sherlock Holmes and gives him a piece of paper with the following mysterious sequence of stick figures.

Holmes examines all of the occurrences of the dancing figures, and they provide him with an important clue—he realises that they form a substitution cipher and cracks the code by frequency analysis.

Holmes rushes to Riding Thorpe Manor and finds Cubitt dead of a bullet to the heart and his wife gravely wounded from a gunshot to the head.

Holmes writes a message—in dancing figure characters—and has it delivered to a lodger named Abe Slaney, another American at a nearby farm.

While waiting for the result of this message, Holmes explains to Watson and Inspector Martin how he cracked the code of the dancing figures.

The last message, which caused Holmes and Watson to rush to Norfolk, read "ELSIE PREPARE TO MEET THY GOD".

The Hong Kong children's book series The Great Detective Sherlock Holmes has a version of this story, titled "The Dancing Code"[18] (解碼緝兇).

A diagram drawn by Conan Doyle
A diagram drawn by Conan Doyle
Slaney is arrested, 1903 illustration by Sidney Paget
1903 illustration by Frederic Dorr Steele in Collier's