Arthur Conan Doyle (1917) His Last Bow. The War Services of Sherlock Holmes – Strand Magazine, September 1917 and in book form in a collection of stories: His Last Bow: Some Reminiscences of Sherlock Holmes, John Murray, October 1917
Although falling slightly outside my time-frame this story is included as it marks a distinctive difference between what can be classified as detective novels, which covers most Sherlock Holmes stories, and spy novels and falling clearly into the latter genre. It also marks the end of the Sherlock Holmes era so deserves inclusion on that score alone.
Synopsis [Wikipedia]:
On the eve of the First World War, Von Bork, a German agent, is getting ready to leave England with his vast collection of intelligence, gathered over a four-year period. His wife and household have already left Harwich for Flushing in the Netherlands, leaving only him and his elderly housekeeper. Von Bork’s diplomat friend, Baron von Herling, is impressed by his collection of vital British military secrets, and tells Von Bork that he will be received in Berlin as a hero. Von Bork indicates that he is waiting for one last transaction with his Irish-American informant, Altamont, who will arrive shortly with a rich treasure: naval signals.
Von Herling leaves. Von Bork then hears another car arriving. It is Altamont. By this time, the old housekeeper has turned her light off and retired. Altamont shows him a package.
Altamont proceeds to disparage Von Bork’s safe, but Von Bork proudly says that nothing can cut through the metal, and that it has a double combination lock. He even tells Altamont the combination: “August 1914”. Altamont then insinuates that German agents get rid of their informants when they are finished with them, naming several who have ended up in prison. Altamont’s mistrust of Von Bork is evident in his refusal to hand over the package before he gets his cheque. Von Bork, for his part, wants to examine the document before handing over the cheque.
Altamont hands him the package. Upon opening it, he finds it to be a book called Practical Handbook of Bee Culture, hardly what he expected. Even less expected is the chloroform-soaked rag that is held in his face by Altamont a moment later. Altamont, it turns out, is none other than Sherlock Holmes, and the chauffeur who brought him is Dr. Watson. Now much older than in their heyday, they have nonetheless not only caught several spies (Holmes is actually responsible for the imprisoned agents of whom he spoke) in their return from retirement, but fed the Germans some thoroughly untrustworthy intelligence. Holmes has been on this case for two years, and it has taken him to Chicago, Buffalo, and Ireland, where he learnt to play the part of a bitter Irish-American, even gaining the credentials of a member of a secret society. He then identified the security leak through which British secrets were reaching the Germans.
The housekeeper was part of the plot too. The light that she switched off was the signal to Holmes and Watson that the coast was clear.
They drive Von Bork and all of the evidence to Scotland Yard.
At the end, it is revealed that Holmes has retired from active detective work. He spends his days beekeeping in the countryside and writing his definitive work on investigation.
Full text at: https://archive.org/stream/TheStrandMagazineAnIllustratedMonthly/TheStrandMagazine1917bVol.LivJul-dec#page/n241/mode/2up and http://www.gutenberg.org/files/2350/2350-h/2350-h.htm