I'm not sure if Arthur Conan Doyle's Sherlock Holmes ignited interest in the subject, or if it was the White Chapel murders, but I can't seem to think of a time earlier than that where "murder mysteries" seemed mainstream (though I admit I'm not well educated on the subject, and I'm only familiar with British and American history). I know the idea of crimes and law enforcement has changed dramatically over the course of human history, but was there a time when the art of investigation first started capturing the public interest?
More can always be said about this topic, but you may be interested in this previous answer of mine.