To track the culprits, Holmes employs Toby, a dog with a keen sense of smell, to follow the trail of creosote left by the wooden-legged man. This demonstrates Holmes's innovative use of resources.
The pursuit leads them to a boatyard, where they learn the wooden-legged man has hired a steam launch, the Aurora. Holmes then enlists the help of the Baker Street Irregulars, a network of street children, to locate the boat across London's docks.
Holmes deduces that the diminutive accomplice is likely from the Andaman Islands, known for small, fierce people, based on a consultation of a book, showcasing his vast knowledge and analytical approach.
The investigation culminates in a dramatic boat chase on the River Thames, with Holmes, Watson, and Athelney Jones pursuing the Aurora.
During the chase, they confront the wooden-legged man, Jonathan Small, and his accomplice, Tonga, the Andaman Islander. Tonga is shot and falls into the water, and Small is captured.
Upon retrieving the treasure box, it is discovered to be empty, adding another layer of mystery and frustration to the resolution of the case.
Jonathan Small, the wooden-legged man, confesses his story, revealing the full history of the Agra treasure. He explains that he, along with three other men (including Tonga), formed a pact known as the 'Sign of the Four' to share the treasure.
Small recounts how he, Major Sholto, and Captain Morstan were involved in the initial theft of the treasure in India. He details how Major Sholto double-crossed them, claiming the treasure for himself and leading to Captain Morstan's death.
Small's motivation for revenge against the Sholto family and his escape from prison with Tonga are revealed, providing a complex backstory driven by perceived injustice and betrayal.
The treasure itself is ultimately lost, having been thrown into the Thames by Small, symbolizing that greed often leads to no lasting gain.
Mary Morstan, who was initially seeking her rightful share of the treasure, is left without it, but finds solace in the truth and the developing romantic relationship with Dr. Watson.
The case concludes with justice being served, albeit with the treasure lost, and highlights the themes of greed, betrayal, and the complex nature of justice and retribution.