Even more than writing in other genres, mystery writing tends to follow standard rules. This is because readers of mysteries seek a particular experience: they want the intellectual challenge of solving the crime before the detective does, and the pleasure of knowing that everything will come together in the end. Of course, the best way of testing the mystery writing rules that follow is to read widely in the genre. See how others use them or how and when they get away with breaking them.
1. In mystery writing, plot is everything. Because readers are playing a kind of game when they read a detective novel, plot has to come first, above everything else. Make sure each plot point is plausible, and keep the action moving. Don't get bogged down in back story or go off on tangents.
2. Introduce both the detective and the culprit early on. As the main character, your detective must obviously appear early in the book. As for the culprit, your reader will feel cheated if the antagonist, or villain, enters too late in the book to be a viable suspect in their minds.
3. Introduce the crime within the first three chapters of your mystery novel. The crime and the ensuing questions are what hook your reader. As with any fiction, you want to do that as soon as possible.
4. The crime should be sufficiently violent -- preferably a murder. For many readers, only murder really justifies the effort of reading a 300-page book while suitably testing your detective's powers. However, also note that some types of violence are still taboo including rape, child molestation, and cruelty to animals.
5. The crime should be believable. While the details of the murder -- how, where, and why it's done, as well as how the crime is discovered -- are your main opportunities to introduce variety, make sure the crime is plausible. Your reader will feel cheated if the crime is not something that could really happen.
6. The detective should solve the case using only rational and scientific methods. Consider this part of the oath written by G.K. Chesterton for the British Detection Club: "Do you promise that your detectives shall well and truly detect the crimes presented to them using those wits which it may please you to bestow on them and not placing reliance on nor making use of Divine Revelation, Feminine Intuition, Mumbo Jumbo, Jiggery-Pokery, Coincidence, or Act of God?"
7. The culprit must be capable of committing the crime. Your reader must believe your villain's motivation and the villain must be capable of the crime, both physically and emotionally.
8. In mystery writing, don't try to fool your reader. Again, it takes the fun out. Don't use improbable disguises, twins, accidental solutions, or supernatural solutions. The detective should not commit the crime. All clues should be revealed to the reader as the detective finds them.
9. Do your research. "Readers have to feel you know what you're talking about," says author Margaret Murphy. She has a good relationship with the police in her area, and has spent time with the police forensic team. Get all essential details right. Mystery readers will have read a lot of books like yours; regard them as a pretty savvy bunch.
10. Wait as long as possible to reveal the culprit. They're reading to find out, or figure out, whodunit. If you answer this too early in the book, the reader will have no reason to continue reading