Aeon magazine (one of my favourites) has an article about the history of the detective, both factual and fictional. It’s by Jason Webster, an American crime novelist, travel writer and critic. He’s got a bio on Wikipedia (not much use) and his own website (recommended).
Mr Webster begins by suggesting you can learn a lot about a society from its detective fiction. He traces the first detective back to the first murder, Cain and Abel. It’s a bit tough having Jehovah on your case. The modern detective begins with, maybe, Edgar Allan Poe’s “The Murders in the Rue Morgue.” That was in 1841. In the 1860s things took off, Wilkie Collins and many more.
The reason for this was probably the sudden creation of a class of literate factory-workers (whatever the drawbacks of the industrialisation of England and Europe and America in the 19th century, it did promote literacy – the workers had to be able to read). Add cheap industrial book-production and you had the birth of pulp fiction. Literary types like Matthew Arnold sneered – “tawdry novels in railway stations” – but a revolution was afoot.
And, of course, the invention of the real detective himself. The police began detecting crimes, getting scientific or at least methodical about it, in the 1840s.
But why the detective as hero? Why didn’t we see a whole genre built about the figure of the sanitary engineer, say? Because, says Webster, the detective is an iconic figure, a shaman, one who deals with the worst of crimes (murder). Murder threatens the calm and order of life with chaos: the detective restores what has been ripped asunder, telling us not only who dunnit, but how and why – and what it means. He’s a species of priest.
Something more than a priest, too. Authoritarian regimes both Left and Right have disapproved of freelance order-restorers – Stalin and Mussolini both banned them. Maybe it wasn’t that non-State actors were getting involved in State business that upset the bosses as the fact that detective stories always begin with the proposition that society is dysfunctional – in Cambodia or Thailand, for example, they tell the reader that the cops are corrupt and that the little people get ripped off. The Stalins and Mussolinis of this world don’t like that. Hitler didn’t ban crime fiction, but he insisted that it depict honest and trustworthy cops upholding the rule of law.
I’d dearly love to see someone set a detective series in the Vatican.
Anyway, the essay is well worth reading.