Writing

How to Write a Detective Story: The 5 Elements of Crime Novels

Written by MasterClass

Last updated: Sep 9, 2021 • 5 min read

Full of cliffhangers and puzzles, crime stories are an exciting genre of fiction writing that can capture readers’ imaginations and keep them turning pages.

Learn From the Best

What Is a Detective Story?

A detective story is one whose plot hinges on a crime that the characters investigate and attempt to solve. Also called “whodunnit” stories or crime stories, most detective stories are written from the point of view of a detective, and many detective-story writers feature the same detective throughout a large body of work.

The first modern detective story is widely considered to be “The Murders in the Rue Morgue” by Edgar Allan Poe. Since then, famous fictional sleuths include Sherlock Holmes and Dr. Watson, from many stories and novels by Sir Arthur Conan Doyle, and Hercule Poirot, from the novels of Agatha Christie.

There are a few subgenres that detective stories may fall under:

  • Police-department procedurals. These focus on police work and often feature homicide investigators and other departments of a local police force.
  • Cozy mysteries. These have a lighter tone than traditional detective fiction and avoid explicit depictions of the murder. They are often set in a small town and focus on puzzle-solving rather than suspense. Learn more about cozy mysteries in our guide here.
  • Hardboiled detective stories. These stories are usually dark and explicit, featuring a veteran detective who treats violent crimes matter-of-factly.
  • Thrillers. These emphasize suspenseful storytelling, often featuring chase scenes or murder sprees that the detective must stop before times runs out. Learn more about writing thrillers in our overview here.
  • Locked-room mysteries. These feature crimes that, at the outset, appear impossible—for instance, a murder taking place in a seemingly locked room with no other way in or out.

The 5 Basic Elements of a Detective Story

To learn how to write a detective story, you’ll need to know the basic elements that almost every good one has:

  1. 1. A detective. Every good detective storyline will have a detective, usually featured as the protagonist. But putting a private investigator in your story isn’t as easy as it sounds—you’ll need to develop a character that readers will enjoy following during an entire novel (or even a series). You should spend time thinking about your detective’s personality, their motivations, their background, their strengths, and their weaknesses. You’ll want your detective to be unique among the other detectives out there.
  2. 2. A crime. Most detective stories revolve around a central crime or string of related crimes. Since the crime will be the catalyst of your short story or novel, it should be interesting, memorable, and seemingly unsolvable—that way, readers will be so tantalized by the mystery of it that they’ll need to keep reading. A dead body is a very common crime in detective fiction, but there are plenty of other options—from robberies to disappearances.
  3. 3. Suspects. Many detective stories include an array of suspects that could have committed the crime (either they have weak alibis or have a history of lying). Your suspects are a vital part of your detective story because they serve as red herrings (or distractions) that will direct readers’ attention away from the true culprit. Some mystery novels, however, don’t have any suspects—this is a deliberate choice by crime writers that serves to heighten the tension in the story, but if your story doesn’t have any suspects, you’ll have to find creative ways to keep the case from going cold.
  4. 4. An antagonist. Every good detective story—and every good story in general—has an antagonist or the person whose goals are in direct conflict with the antagonist’s. Traditionally, the antagonist is the true culprit for the story’s crime (or crimes), but that’s not who your antagonist has to be; the antagonist of your story could be a police officer who wants to solve the crime first or someone who knows the identity of the culprit and is trying to cover it up.
  5. 5. A setting. The setting is a very important part of any detective story because the action in most detective stories takes place on the streets of its location, and therefore the stories are inextricably linked to the time and place they are set in and are memorable because of those details.

5 Tips for Writing a Good Detective Story

When writing detective stories or novels, keep these tips in mind.

  1. 1. Give your characters interesting motivation. The motivation of the culprit is one of the most crucial and prominent parts of detective work—what readers want to know even more than who committed the crime is why they committed it. Nothing spoils a good detective story more than an uninteresting or unbelievable motivation (for instance, a serial killer who is just “pure evil” and has no discernable reasons for murdering) or an unmotivated confession. In the same vein, your detective should also have a strong motivation for being in this line of work—it’s not easy, and many people wouldn’t be able to stomach it.
  2. 2. Learn about detective work. Readers want to feel immersed in the world of your detective story—whether it’s the world of the law or the seedy underbelly of a small town. That’s why it’s so important to get the details right when crime writing—so you can keep the reader’s attention with believable plot points. Do the research to make sure that you know who would be the first to make it to the scene of a crime, how detectives would go about tracking people down or questioning them, and what role forensics would play in your crime scene, so that your readers don’t spend any time wondering if what they’re reading is accurate to real life.
  3. 3. Don’t make it too easy. Readers pick up detective fiction because they want to be intrigued by a good mystery—so if your crime is too easy for them to solve, they’ll get bored and likely not finish the story. Trust in your readers’ ability for logical deduction and don’t give too much away, leaving them guessing and really shocking them.
  4. 4. Make sure there’s a payoff. Try to avoid an outcome where readers will feel let down by the answer to your novel’s mystery. In the words of S. S. Van Dine, a famous mystery-novel-writing art critic, “A crime in a detective story must never turn out to be an accident or a suicide. To end an odyssey of sleuthing with such an anti-climax is to hoodwink the trusting and kind-hearted reader.” By that same logic, try to avoid any “deus ex machina” storytelling—in which an impossible-to-solve situation is suddenly resolved with little or no effort from the characters.
  5. 5. Experiment and innovate. Read lots of detective fiction and then subvert the tropes—what if your main character is the person who committed the crime, and your bad guy is the detective or official investigator working to solve it? Or what if your character’s love interest was the victim?

Want to Learn More About Writing?

Become a better writer with the MasterClass Annual Membership. Gain access to exclusive video lessons taught by literary masters, including Neil Gaiman, David Baldacci, Joyce Carol Oates, David Sedaris, Dan Brown, Margaret Atwood, and more.