The film is divided into two separate, unequal stories. In the shorter of the two, Holmes is approached by a famous Russian ballerina, Madame Petrova (Tamara Toumanova), who proposes that they conceive a child together, one who she hopes will inherit her physique and his intellect. Holmes manages to extricate himself by claiming that Watson is his lover, much to the doctor's embarrassment.
In the main plot, a Belgian woman, Gabrielle Valladon (Geneviève Page) is fished out of the River Thames and brought to Baker Street. She begs Holmes to find her missing engineer husband. The resulting investigation leads to a castle in Scotland. Along the way, they encounter a group of monks and some midgets, and Watson apparently sights the Loch Ness monster.
It turns out that Sherlock's brother Mycroft (Christopher Lee) is involved in building a pre-World War I submarine for the British Navy, with the assistance of Monsieur Valladon. When taken out for testing, it was disguised as a sea monster. The midgets were recruited as crewmen because they took up less space and needed less air. When they meet, Mycroft informs Sherlock that his client is actually a top German spy, Ilse von Hoffmanstal, sent to steal the submersible. The "monks" are German sailors.
Queen Victoria (Mollie Maureen) arrives for an inspection of the new weapon, but objects to its unsportsmanlike nature. She orders the exasperated Mycroft to destroy it, so he conveniently leaves it unguarded for the monks to take (rigging it to sink when it is submerged). Fräulein von Hoffmanstal is arrested, to be exchanged for her British counterpart.
In the final scene some months later, Sherlock receives a message from his brother, telling him that von Hoffmanstal had been arrested as a spy in Japan and subsequently, executed by firing squad. Saddened, the detective retreats to his room to seek solace in drugs and his violin.
The film was not a major box office success and has received mixed reviews. While 21 critics give it a 95% fresh rating on Rotten Tomatoes (a number considered insufficient for a consensus), the 3800 audience raters give it a somewhat lower 68% rating. Kim Newman, reviewing it in Empire magazine, described it as the "best Sherlock Holmes movie ever made" and "sorely underrated in the Wilder canon". Peter Bradshaw of The Guardian, reviewing the film in 2002, wrote: "Billy Wilder's distinctive, irreverent slant on the world's greatest 'consulting detective' holds up reasonably well 32 years on; you wouldn't expect anything directed by Wilder and scripted by his long-time associate I. A. L. Diamond to be anything less than funny and watchable, and this is both." Roger Ebert was more critical, giving the film two and a half stars out of four. He wrote that it is "disappointingly lacking in bite and sophistication", that it "begins promisingly enough" but that "before the movie is 20 minutes old, Wilder has settled for simply telling a Sherlock Holmes adventure."