Write an outline. An outline isn't necessary, but it can be a great help when writing a murder mystery. Plotting can not only help keep you on course, but it can help ensure there are no holes in your story. How much outlining you do will depend upon your style, but at the very least, outline the key plot points of your story, including where you plant the clues to help readers and your protagonist solve the mystery.
Develop strong characters. You'll need a protagonist (the person who will be trying to solve the murder mystery) several suspects and a victim. Be sure to develop these characters in your story fully. That includes your victim. Just because your victim will be dead soon, that doesn't mean the character's story isn't important. In fact, it may play a crucial role in helping to solve the mystery.
Plant clues to help your readers solve the mystery. Planting clues in a murder mystery is one of the conventions of the genre. The clues should be challenging enough to make it interesting for readers, but not so hard to discover that they can't keep up. Readers of this genre relish the idea of discovering the murderer before your protagonist does, so plant clues that will keep your readers one step ahead of your protagonist.
Add red herrings--false clues--to keep the story challenging, but be sparing with them and always follow a red herring with a real clue, one that will give readers a chance to realize the previous clue was meant to throw them off course.
Write an ending that summarizes the events of the story. This ending should wrap up all of the details without being contrived. This can help those readers who didn't figure out the mystery until it was revealed at the end. A quick flashback of the crime or creative character dialogue can help wrap up the story.