As in life…some rules can safely be broken, others can’t. Determining which is which often demonstrates who is the proficient writer and who is not.
Quite a few of the rules for writing detective stories are similar to those for writing murder mysteries, suspense novels, and thrillers. Others are very different.
1. The story must have a detective, or detective partners as its main character(s). These can be duly sworn police detectives, fire department arson investigators, licensed private investigators, FBI special agents, homeland security investigators and the like, or military police officers of high enough rank to be investigating crimes. They are law enforcement professionals on the case to solve a particular crime or series of crimes.
2. The story must have a victim or victims. Usually there is a dead body, preferably more than one. But the crime could be kidnap, or arson that did not result in murder, or perhaps eco-terrorism resulting in corpses or not. The crime could involve the brutalization or killing of animals (especially if the detective is a park ranger). Most often there is a human murder or murders.
3. The detective story is an intellectual game, much like solving a puzzle or playing chess. There are opponents in this game. The detective is pitted against the criminal. They must be equally matched for it to be a good game. Although the reader knows the detective is going to win, for it to be a compelling story, it has to feel at times, as if the criminal might triumph over the detective. The criminal must be clever enough to inflict some mental, emotional, and/or physical damage on the detective(s).
4. The old axiom was that the criminal’s identity must be unknown to both the detective(s) and the reader until the very end. This is still largely true. If the criminal’s identity is know the story becomes suspense. Lately, there’s been some line blurring in this area. In the modern market place, many genres have blurry lines.
5. The criminal should be introduced early in the story, amidst a field of plausible red herrings. There’s nothing worse than having the criminal sprung on the reader, out of the blue, at the last minute. There could be more than one culprit. So, secondary culprits can be introduced later. Still, it’s sort of cheating to wait till the very end even for those to be brought into the story line. Don’t want to give the reader a bait-and-switch feeling. Finding out who the killer is at the end ~ good. Introducing the killer at the end ~ bad idea.
6. The crime should also be introduced at the beginning. It’s been said within the first three chapters. The first chapter is best. Opening up in the very midst of it, helps grab the reader’s attention. The specific crime must fit the criminal’s psyche and personality, and he/she must have had the know-how and ability to commit said crime.
7. Supply plausible and understandable clues that both give hints as to the identity of the criminal, and also clues that point to others who are merely red herrings. Also leave clues as to the motive for the crime(s).
8. In days gone by, it was almost written in stone that the detective story is simply one of detecting, that no social issues must be brought into it and certainly no romance. This is no longer the case. Readers enjoy a detective protagonist with a social conscience, or definite lack thereof. It makes him/her more interesting. In the same way a love interest for the detective often gives her/him an Achilles’ heel which the crafty criminal can take advantage of. The Christian detective story must have inspirational or redemptive elements to it. However, in the detective sub-genre, the overwhelming majority of the plot must be about the protagonist detective(s) detecting and solving the crime(s), or else it’s not a detective story.
9. The crime must not be solved by super-natural or extraordinary means. The criminal can’t be caught via psychic powers, magic, assistance from ghosts, aliens from another planet, or the like. Those scenarios make the story speculative fiction, not a detective story. Although in today’s world, it’s entirely possible to have a spec fic detective story, but that book would not be shelved with detective stories in a book store. Then again, you might hit a bookstore where it would be. Go figure.