Mystery fiction is a genre of fiction usually involving a mysterious death or a crime to be solved. In a closed circle of suspects, each suspect must have a credible motive and a reasonable opportunity for committing the crime. The central character must be a detective who eventually solves the mystery by logical deduction from facts fairly presented to the reader. Sometimes mystery books are nonfictional. "Mystery fiction" can be detective stories in which the emphasis is on the puzzle or suspense element and its logical solution such as a whodunit. Mystery fiction can be contrasted with hardboiled detective stories, which focus on action and gritty realism.
Mystery fiction may involve a supernatural mystery where the solution does not have to be logical, and even no crime involved. This usage was common in the pulp magazines of the 1930s and 1940s, where titles such as Dime Mystery, Thrilling Mystery and Spicy Mystery offered what at the time were described as "weird menace" stories—supernatural horror in the vein of Grand Guignol. This contrasted with parallel titles of the same names which contained conventional hardboiled crime fiction. The first use of "mystery" in this sense was by Dime Mystery, which started out as an ordinary crime fiction magazine but switched to "weird menace" during the latter part of 1933.
The genre of mystery novels is a young form of literature that has developed since the early-19th century. The rise of literacy began in the years of the English Renaissance and, as people began to read over time, they became more individualistic in their thinking. As people became more individualistic in their thinking, they developed a respect for human reason and the ability to solve problems.
Perhaps a reason that mystery fiction was unheard of before the 1800s was due in part to the lack of true police forces. Before the Industrial Revolution, many of the towns would have constables and a night watchman at best. Naturally, the constable would be aware of every individual in the town, and crimes were either solved quickly or left unsolved entirely. As people began to crowd into cities, police forces became institutionalized and the need for detectives was realized – thus the mystery novel arose.
An early work of modern mystery fiction, Das Fräulein von Scuderi by E. T. A. Hoffmann (1819), was an influence on The Murders in the Rue Morgue by Edgar Allan Poe (1841) as may have been Voltaire's Zadig. Wilkie Collins' epistolary novel The Woman in White was published in 1860, while The Moonstone (1868), is often thought to be his masterpiece. In 1887 Arthur Conan Doyle introduced Sherlock Holmes, whose mysteries are said to have been singularly responsible for the huge popularity in this genre. The genre began to expand near the turn of century with the development of dime novels and pulp magazines. Books were especially helpful to the genre, with many authors writing in the genre in the 1920s. An important contribution to mystery fiction in the 1920s was the development of the juvenile mystery by Edward Stratemeyer. Stratemeyer originally developed and wrote the Hardy Boys and Nancy Drew mysteries written under the Franklin W. Dixon and Carolyn Keene pseudonyms respectively (and were later written by his daughter, Harriet Adams, and other authors). The 1920s also gave rise to one of the most popular mystery authors of all time, Agatha Christie, whose works include Murder on the Orient Express (1934), Death on the Nile (1937), and the world's best-selling mystery And Then There Were None (1939).