How to Write a Whodunnit or Detective Movie

How to Write a Whodunnit


A whodunnit is more a narrative structure, than a genre (although one could easily argue it’s a sub-genre).

That’s why it can be presented in the form of a thriller, a horror, a mockumentary and even a comedy.

The structure encompasses everything from the gritty L.A. Confidential to the broadly comic Murder Mystery.

In a whodunnit, a crime motivates the protagonist to search for clues that reveal the identity of the antagonist, who is usually hidden in plain sight.

So, how can you approach this genre in terms of screenwriting?

Let’s start with…


Key Points When Writing A Whodunnit


  • Establish the protagonist and his/her relation with the crime
  • Establish the antagonist’s motive
  • Research the geographical-historical setting and use it to feed the plot
  • Plant some clues along the way

A whodunnit should surprise your audience, but every clue leading to the revelation should be always on full display.

It should also motivate a re-watch. One where the audience already knows who did it.

Regardless of the knowledge of the outcome, the re-watch should offer a slightly different but equally engaging experience.

True Detective vs. Se7en — Creating Light Amongst The Dark

The Balance Between Plot And Character Development


When writing a whodunnit, it’s easy to focus exclusively on the crime plot to keep the action moving. Anything about character backstory could be perceived as a block to the rhythm of the story.

However, a whodunnit with undeveloped characters won’t generate empathy. And if your audience doesn’t connect with your characters, it won’t matter how brilliantly made the crime (and the deduction method!) is.

With that in mind, let’s talk about…


The Whodunnit Protagonist

Whodunnit Protagonist Mother

The vast majority of the time, the protagonist of a whodunnit will be a detective. Makes sense. 

However, that’s not final. Far from it.

No matter his/her occupation, what really matters is that the protagonist’s goal is primarily to reveal the culprit.

His/her search for justice must be personal or at least have a connection to his/her personal life. It’s the most effective way to generate empathy with the audience and to better understand his/her struggle.

Bong Joon-ho’s Mother has a great lead character. Although it’s a whodunnit story full of detectives, the real protagonist is the unnamed mother, who embarks on a difficult mission to prove her son’s innocence.

Mother Official HD Trailer - From the Director of THE HOST

The Whodunnit Antagonist


A whodunnit must have an antagonist with a believable motive. His/her actions must be fully justified according to his/her point of view.

A two-dimensional ambition to destroy the world or carry out evil for the sake of it won’t cut it.

The crime must also be credible. The antagonist must clearly have the physical and mental abilities to carry it out.

This seems obvious, but some writers may be tempted to have an antagonist whom no one suspects for these reasons.

You should introduce your antagonist as soon as possible. The tension of a whodunnit consists precisely on the fact that we already met the culprit without knowing it.

An antagonist who appears in the third act will be a disappointing revelation.

L.A. Confidential offers a great antagonist (James Cromwell’s character). He appears as soon as the second scene. He has a solid motive and, of course, he has full physical and mental faculties to carry out the crime.

LA Confidential (1997) Official Trailer - Kevin Spacey, Guy Pearce Movie HD

Research Your Whodunnit Context


Researching for a whodunnit screenplay is crucial.

With so many scientific elements surrounding a crime, it’s essential to have all possible data about it at hand.

Your research will depend entirely on the setting of your story. Time and place will dictate the modus operandi of all your characters. From the type of crime itself, the law’s loopholes, to the deduction methods of the protagonist.

It’s not the same to display a crime perpetrated in 2019’s Medellin as in 18th-century Paris. The social, geographical, historical and cultural context will shape your characters and, therefore, the way they commit (and solve) crime.


Planting Clues On A Whodunnit

Girl With Dragon Tatoo Whodunnit

First things first: you don’t need to fill the plot with clues. Just one or two clues can believably doom your antagonist.

The key is to plant the clues casually. Something that definitely doesn’t attract much attention. A clue that doesn’t tell us much by itself but that reveals everything when contextualized with other facts.

Perhaps a “random” gossip between some secondary characters may be the bit of information that makes the entire puzzle fit. Or perhaps the antagonist’s reaction to a more casual event.

For example, a rewatch of The Girl With the Dragon Tattoo reveals a chilling moment: a victim’s screech is quickly and casually dismissed by the antagonist as the sound of the wind through an open door.

In that regard, it can be a good idea to…


Plot Backward


A great way to write a whodunnit is to plot backward. Put yourself in the shoes of the antagonist, commit the crime (establishing the how and the why) and seek to hide any incriminating elements.

In that same process, it’s where you will decide to leave some clues for the protagonist to find.

To plot backward will allow you to better understand your antagonist. It’ll also ease the investigation elements of your writing.

When the antagonist has finished covering his/her tracks (or, well, believing he/she did), it’s time to focus on the story of the protagonist.

And whatever you do…


Don’t Cheat The Audience


One thing is to prevent the audience from discovering the antagonist ahead of time. Another, very different, is to trick them.

A good whodunnit should allow the viewer–especially in the rewatch–realize that the clues were always there for all to see.

The audience should discover the clues at the same time as the protagonist. So, avoid unexpected “surprises” like identical twins, fortuitous discoveries or Deus Ex Machina.

Any vital information hidden from the audience is a cheat.

The Usual Suspects (1995) - Original Trailer

Unmasking The Culprit


This is simple: The key to writing your whodunnit climax scene is to treat the discovery as a realization rather than a revelation.

A good example of this happens in The Usual Suspects. We can actually see how Detective Kujan ties all the ends in a two-minute sequence. He discovers a final clue, reviews all evidence one more time and REALIZES who Keyser Söze is.



Don’t Be Afraid To Subvert Some Whodunnit Rules


In the end, a whodunnit is a game of misdirection and clues. You shouldn’t be afraid to use what’s expected of a whodunnit structure to your advantage, as long as you surprise your audience without cheating them.

Murder on the Orient Express | Official Trailer [HD] | 20th Century FOX

After All:


  • Se7ens antagonist is not introduced until the third act, where he also surprises us all by surrendering. The tension isn’t lost.
  • In Memento, the line that separates the protagonist from the antagonist is progressively blurrier.
  • In Zodiac, the antagonist is never fully revealed. Still, it’s one of the best pieces of filmmaking ever created and the tension lasts two and a half hours. 
  • In Basic Instinct, the antagonist is ridiculously evident from the get-go. And it’s precisely that predictability that ends up misleading–not cheating–the audience.
  • The ending of Murder On The Orient Express was exquisitely designed to break all that was established within the structure. Now, it’s an essential whodunnit piece.

Are you a whodunnit screenwriter?

The above steps can certainly help you find out if you are and put you on your way to a great whodunnit screenplay.


– What did you think of this article? Share It, Like It, give it a rating, and let us know your thoughts in the comments box further down…
– Struggling with a script or book? Story analysis is what we do, all day, every day… check out our range of script coverage services for writers & filmmakers.

Get *ALL* our FREE Resources

Tackle the trickiest areas of screenwriting with our exclusive eBooks. Get all our FREE resources when you join 60,000 filmmakers on our mailing list!

Success! Thanks for signing up, now please check all your email folders incl junk mail!

Something went wrong.

1 thought on “How to Write a Whodunnit or Detective Movie”

  1. Am Kayinga Robert from Uganda East Africa.
    I really loved this article and it gonna help me write a super first whodunnit in 2022
    thanks so much


Leave a Comment


Get *ALL* our FREE Resources

Tackle the trickiest areas of screenwriting with our exclusive eBooks. Get all our FREE resources when you join 60,000 filmmakers on our mailing list!

Success! Thanks for signing up, now please check all your email folders incl junk mail!

Something went wrong.

Send this to a friend