The Seven-Per-Cent Solution (1976) is a Sherlock Holmes pastiche by Nicholas Meyer. Published as a "lost manuscript" of the late Dr. John H. Watson, it recounts Holmes's recovery from addiction to cocaine (with the help of Sigmund Freud) and his subsequent prevention of a European war through the unravelling of a sinister kidnapping plot.
It was turned into a movie in 1976, starring Nicol Williamson as Sherlock Holmes, Robert Duvall as Watson, and Alan Arkin as Dr. Sigmund Freud.
Meyer's revisionist novel purports to replace two of the canonical Sir Arthur Conan Doyle short stories -- "The Adventure of the Final Problem", in which Holmes apparently died at the hands of Prof. James Moriarty, and "The Adventure of the Empty House", in which Holmes reappeared after a three-year absence and revealed that he had not been killed after all. This novel presents those two tales as sheer fabrications, published by Watson to deceive the public about the truth behind Holmes's temporary disappearance.
According to Meyer's account, Holmes's view of Moriarty as the "Napoleon of crime" was nothing more than the fevered imagining of his cocaine-sodden mind; Moriarty was actually the childhood mathematics tutor of the two Holmes brothers (Sherlock and Mycroft). Furthermore, the teacher meets Watson, denies that he is a criminal and reluctantly threatens to sue Holmes for slander unless the accusations stop.
The heart of the novel consists of an account of Holmes's recovery from his cocaine addiction. Watson and Holmes's brother Mycroft succeed in inducing Holmes to travel to Vienna, where Watson manages to lead him into the presence of Dr. Freud. Freud, through a treatment consisting largely of hypnosis, helps Holmes shake off his addiction and his delusions about Moriarty, but neither he nor Watson can restore Holmes's dejected spirit.
What finally does the job is a whiff of mystery: one of Freud's patients is kidnapped and Holmes's curiosity is sufficiently aroused that he undertakes to investigate. The case takes Holmes, Watson, and Freud on a breakneck train ride across Austria in pursuit of a foe who is about to launch a war involving all of Europe. (Holmes remarks during the denouement that they have succeeded only in postponing war, not in preventing it; we are presumably to understand that World War I was the conflagration ultimately at issue.)
One final hypnosis session reveals that a key traumatic event was when Moriarty had to inform the Holmes brothers that their mother was murdered by their father. Freud and Watson conclude that this traumatic event helped push Sherlock to subconsciously blame his teacher for her death, but also drove him to devote his future career to opposing evil. The film version of this revelation was changed to Sherlock seeing his mother's murder before his eyes when he was a child when his father caught her in bed with Moriarty.
Opinions of Sherlockians and Holmesians have been divided on the novel. In its favor it can surely be said that Meyer captures the "flavor" of the canonical tales better than any writer since Doyle (arguably even better than Adrian Conan Doyle). The account of Holmes's throwing off of his cocaine addiction is particularly well done and, at times, genuinely touching. Moreover, Meyer's presentation of the character interaction (and intellectual commonalities) between Holmes and Freud is quite effective. However, accepting the novel's revised Holmesian history would require adjustments throughout much of the Canon, since Prof. Moriarty plays a key role in e.g. The Valley of Fear and the continuing influence of his henchmen is a key plot element in several others.
Meyer is also the author of two other Holmes pastiches: The West End Horror and The Canary Trainer.