Here's the process: start with an idea, then create biographies for the major characters, including the murderer. The murderer has a plan for murder, "the plot behind the plot".
Once you have the plot behind the plot and know what the murderer is up to, the next step is to make a stepsheet for the plot, which is a detailed, comprehensive plan for a damn good mystery. After the stepsheet is finished, the next step is doing a rough draft, then a working draft, then perhaps a second working draft, then a final draft, and then a polish or two to make the prose gleam. By going about it in such an organized way, it should take, for an 80,000-word novel, about 3 to 5 months, full time; 6 to 8 months, part time.
~ James N. Frey (How to Write a Damn Good Mystery)