Noir fiction (or the French novel noir) is a subgenre of crime fiction. In its modern form, noir has come to denote a marked darkness in theme and subject matter, generally featuring a disturbing mixture of sex and violence. Noir works are existential pessimistic tales about people, including protagonists who are seriously flawed and morally questionable. The tone is generally bleak and nihilistic, with characters whose greed, lust, jealousy, and alienation lead them into a downward spiral as their plans and schemes inevitably go awry.
American-style hardboiled fiction novels are related to noir fiction. Howerver, they are essentially an extension of the wild west and pioneer narratives of the 19th century. The wilderness becomes the city, and the hero is usually a somewhat fallen character, a detective or a cop. At the end, everything is a mess, people have died, but the hero has done the right thing or close to it, and order has, to a certain extent, been restored.
More on Wikipedia