Though Hammett worked for a time as a private detective for the Pinkerton Detective Agency in San Francisco (and used his birth name "Samuel" for the story's protagonist), Hammett called Spade "a dream man" with "no original". As the author wrote of the character in 1934:
Spade has no original. He is a dream man in the sense that he is what most of the private detectives I worked with would like to have been, and, in their cockier moments, thought they approached.
Hammett reportedly drew upon his years as a detective in creating many of the other characters for The Maltese Falcon, which reworks elements from two of his stories published in Black Mask magazine in 1925, "The Whosis Kid" and "The Gutting of Couffignal". The novel itself was serialized in five parts in Black Mask in 1929–30 before being published in book form in 1930 by Alfred A. Knopf.
The 1941 film is the third film version of the novel. The first version (1931) starred Ricardo Cortez as Sam Spade and Bebe Daniels as Brigid O'Shaughnessy. The second, titled Satan Met a Lady (1936), starred Warren William and Bette Davis. It was rewritten as a light comedy, with many elements of the story changed.
Warner Bros. had been prevented by the Hays Office censors from re-releasing the 1931 version due to its "lewd" content; it was not until after 1966 that unedited copies of the 1931 film could be shown in the U.S. Though largely compliant with the Production Code, Huston's remake did contain some innuendo: when the police implicate Spade in his partner's murder, Spade asks Detective Polhaus, "What's your boyfriend gettin' at, Tom?".