The Triviality of Murder: I enjoy a lot of procedurals: FRINGE, SUPERNATURAL, and even non-fantasy murder mystery procedurals like ELEMENTARY and CASTLE. Shows like ELEMENTARY and CASTLE, however, have had an odd and not always positive effect on the perception of the genre; they've trivialized the craft of creating murder mysteries.
Writing In Reverse: Inexperienced murder mystery writers have been misled into thinking that murder mysteries are written by coming up with a cast of characters, then a setting, then a mystery, then some clues, and then a method for committing a murder that matches everything they wrote before. This is a mistake; a murder mystery must be outlined in the reverse order with the murder created first before coming up with anything else.
The Audience is not the Author: This might not seem to be the case to viewers. CASTLE isn't about the murders as much as Castle and Beckett arguing. The murders are just to give the characters something to work on so that they're not standing around in a plotless vacuum trading quips or barbs.
The Sequentially Written Murder Mystery: As a result, many first time murder writers understandably think that there is no need to put thought or attention into creating a murder mystery. That one creates the character arcs and set pieces first and then throws in a murder as an instigating event.
The Result is Not The Process: That's what these first time writers see onscreen, after all. They see that TV procedurals don't devote much screentime to the reason for the murder, the method of the murder and the means of concealment. They see that these elements serve merely as inciting incidents and seem almost an afterthought. In the writing process, these writers then treat the reason, method and concealment as an afterthought as well, as the last thing to create.
Struggling for Revelations: This is a deeply counterproductive approach to writing murder mysteries. Writers who work this way concoct random clues in a fit of inspiration, but then struggle to create revelations that match the previous information and come up with strained convolutions to make their answers meet the the previous discoveries.
Circling: Most writers who work like this often get stuck, unable to explain how and why their murderer did it. They are pilots flying an underfueled plane with nowhere to land. TV gives the false impression that murder is merely a plot device that isn't important and can be created at the end of the writing process because the murder is explained at the end. This is an illusion.
Murder Mysteries Come in Two Parts: An effective murder mystery writer starts with outlining the murderer's story, working out how and why the killer did it and obscured their guilt, as well as all the groups and individuals in proximity to the murder whether physically or situationally.
Facts Before Theory: Our effective writer then produces a second story outline, the story of the detective solving the murder. In most mystery stories, it's the detective's story that is most present in the final product, but because it is plotted out after the murderer's story, any clues, suspects, victims, red herrings, false trails and genuine truths will be consistent with the solution -- because the writer has already drafted the murderer’s point of view.
Screentime May Not Correlate: Much of the preparatory work might not appear in the final draft. One of my favourite episodes of CASTLE, "Fool Me Once," opens with a victim being murdered live on webcam during a stream of his crowdfunded North Pole expedition which turns out to be staged in an apartment for the web stream. Questions abound: who was this man if not really a North Pole explorer? Who killed him? Why?
The episode doesn't actually devote too much attention to how the victim was a con man of multiple schemes, one of which was planning to marry an heiress and flee with her money. Or how he genuinely fell in love and no longer wanted to rob his heiress. Or how he wanted to finish his last scam and go straight. Or how his partner, furious at losing the con man giving up a payday, murdered the con man during a web stream so that witnesses would assume the body was in the North Pole.
Foreground: The episode is more about Castle's increasingly ridiculous theories about how this con man may have been a spy, about Castle's latest mystery novel and how it has racy scenes that irritate his associate, about various blind alleys and false leads from Castle's theories -- but these most visible aspects of the story are possible because the writers first worked out the plot of the murderer, the victim, the motive and the means -- creating a solid framework in which they scripted Castle's shenanigans.
Labour: A murder mystery can be a triviality within a story. But it is never trivial to construct a murder mystery. Even in a TV procedural where the murder mysteries will be the least important thing onscreen, creating a murder plot itself needs to be treated by the writers as the most detail-demanding and labour-intensive plot element to create.
Write the Murder First: Murder mystery writers need to start with creating the murder; then they have a clear set of parameters for their suspects, evidence and revelations existing within a chain of cause and effect.
When mystery writers create mysteries first and solutions second, the evidence is invariably random and the solutions are inevitably mismatched. Most writers don't even manage to find a solution and end up paralyzed, searching for answers that should have been written at the start.
It is pointless, stressful, self-destructive and self-immobilizing for a writer to conceive a mystery and then try to create a murder that matches the mystery. It is much easier to create a murder followed by the mystery that obscures it until the detective unravels it. Writing the mystery first is not a healthy or productive way to write a murder mystery.