Plan In Reverse
One of the more common pieces of advice I've seen from Crime novelists and other mystery planners is to work in reverse. You know you have a murder, and that's great, but don't start with the body. Start with who the killer is. Take a piece of notepaper, or a document on your computer, and plot out the following:
- Who killed the victim?
- How are they planning to get away with it?
The second and third questions are particularly important. The killer has a reason, and the killer has a plan. If the reason is "paid to do the kill" then you're not planning who the killer is, but the tool used. Who is paying for the death? Who - ultimately - has the reason for killing this person and why?
Once you have those done, you want to plan out who the victim is. At least enough that they fit with the answer to "Why" someone wanted them dead. From there you can figure out how the murder happened, where the murder happened, what the crime scene looks like, and what evidence is there for your detectives - read: players - to find.
Obfuscate with Suspects
Your murder should have multiple, valid suspects. By valid suspects I mean other people than the killer with the motive, means, and some suspicious evidence that could point at them for the detectives to find. If you only have one clear person with a motive, than you're not going to have much of a challenge.
In a novel you want a good 4-5 to bounce between and that gives a good length of figuring things out. In an RPG you may only want 2-3 in order to help keep the PCs focused on what is going on. However, those 2-3 other suspects should have a reason for wanting the victim dead - a good one too - and also have had the opportunity and means to have the murder happen along the lines it happened.
Something To Feel Guilty About
Those suspects we just talked about? They all need to be hiding something. Something big. Something not related to the murder, but still big and important all the same.
How big? Big enough to lie to the PCs about things they were doing. Big enough to act suspicious. Big enough to not share everything and to keep things hidden and to try to point blame elsewhere.
If not, then there is no real drama or tension. People just help, or point the PCs in directions because that is the effective thing to do. You want things that will make them act like they could be the murderer, even though they're not, because they don't want to be exposed on things either.
What that constitutes depends on the person in question. But it's an important thing to have.