Hardboiled (or hard-boiled) fiction is a literary genre that shares some of its characters and settings with crime fiction (especially detective stories). The genre's typical protagonist is a detective who witnesses the violence of organized crime that flourished during Prohibition (1920–1933) and its aftermath, while dealing with a legal system that has become as corrupt as the organized crime itself. Rendered cynical by this cycle of violence, the detectives of hardboiled fiction are often antiheroes. Notable hardboiled detectives include Philip Marlowe, Mike Hammer, Sam Spade, Lew Archer, and The Continental Op.
The style was pioneered by Carroll John Daly in the mid-1920s, popularized by Dashiell Hammett over the course of the decade, and refined by James M. Cain and by Raymond Chandler beginning in the late 1930s; its heyday was in 1930s–50s America.
From its earliest days, hardboiled fiction was published in and closely associated with so-called pulp magazines, most famously Black Mask under the editorship of Joseph T. Shaw. In its earliest uses in the late 1920s, "hardboiled" didn't refer to a type of crime fiction; it meant the tough (cynical) attitude towards emotions triggered by violence.
Hardboiled writing is also associated with so-called "noir fiction". Eddie Duggan discusses the similarities and differences between the two related forms in his 1999 article on pulp writer par excellence, Cornell Woolrich