The art of the murder mystery is a difficult craft because there needs to be different elements to drive the story along. Without compelling ideas, the reader or viewer will lose interest, and the final act becomes an anticlimax. These are merely small suggestions to get the creative juices flowing.
Create the Monster
For every story, there needs to be a villain who drives the detective or hero through the depths to uncover the mystery. The "monster" of your story has to be driven by a lack of something in his or her own life. Try and place general emotions from love, lust, joy, etc. Now, write a backstory as to why this person would be missing the object of their desire. Who? What? Where? When? Why? The victim can naturally be the obstacle getting in the way of their perverse desire to the point where they resort to murder. Or the victim can have what the monster wants, sparking jealousy. Remember that the motive is just as important as the way your monster operates in any given setting.
Find a Hero
Like Sherlock Holmes to Moriarty, the villain must have someone on their heels to discover the dead body or bodies scattered throughout the story. Similar to creating the monster, the hero needs to be as complex or driven. The ultimate goal is to capture the bad guy, but having someone who has problems such as marital, financial, social and/or even intimacy. The hero needs that edge to ramp up the drama beside the noble quest to uncover the mystery. Be careful not to create someone who is too cynical or jaded with the world like the middle-aged detective who is divorced and an alcoholic. Invent a character that is as unique as the motives are for the killer of the story.
The most important aspect is the chase after the villain, whether it is drawn out throughout a novel or just a small but intense part of the story, but no matter what that entails, it is all about the journey. The final revelation is great, but detailing how the hero and villain finally meet is even better because the reader will discover the events that tie these two people together. The setting creates the mood and atmosphere in which these two are born, hide and battle. Take two random locations such as a hospital and a train station, for example, as your beginning and end and let the story fill the gaps to get from one point to another. Keep in mind the previous elements that create the distinctiveness of both. Read a few true crime stories to familiarise yourself with police procedure or the trials and tribulations of finding the killer.