Sam Spade and Miles Archer are hired by a Miss Wonderly to follow a man, Floyd Thursby, who has allegedly run off with Wonderly's younger sister. Spade and Archer take the assignment because the money is good, but Spade implies that the woman looks like trouble.
That night, Spade receives a phone call telling him that Archer is dead. When questioned by Sgt. Polhaus about Archer's activities, Spade says that Archer was tailing Thursby, but refuses to reveal their client's identity. Later that night, Polhaus and Lieutenant Dundy visit Spade and inquire about his recent whereabouts, and say that Thursby was also killed and that Spade is a suspect. They have no evidence against Spade, but tell him that they will be conducting an investigation into the matter.
The next day, Archer's wife Iva, with whom Spade has earlier had an affair, asks Spade if he killed Miles. He tells her to leave, and tells his secretary Effie Perine to remove "Spade & Archer" on the office door and have it replaced with a simple "Samuel Spade". Visiting his client at her hotel, he learns her real name is Brigid O'Shaughnessy, she never had a sister, and Thursby was an acquaintance who had betrayed her.
Later, Spade is visited by Joel Cairo, who offers Spade $5,000 if he can retrieve a figurine of a black bird that has recently arrived in San Francisco. Cairo suddenly pulls a gun, declaring his intention to search Spade's office, but Spade knocks him unconscious. When O'Shaughnessy contacts Spade, he senses a connection between her and Cairo, and casually mentions that he has spoken to Cairo. O'Shaughnessy becomes nervous, and asks Spade to arrange a meeting with Cairo. Spade agrees.
When they meet at Spade's apartment, Cairo says he is ready to pay for the figurine, but O'Shaughnessy says she does not have it. They also refer to a mysterious figure, "G", of whom they seem to be scared. As the two begin to argue, Polhaus and Dundy show up, but Spade refuses to let them in. As they are about to leave, Cairo screams, and they force their way in. Spade says that Cairo and O'Shaughnessy were merely play-acting, which the officers seem to accept. But they take Cairo with them to the station. Spade tries to get more information from O'Shaughnessy, who stalls.
Spade confronts and instantly dislikes a kid named Wilmer Cook, telling him that his boss, "G", will have to deal with Spade. He later receives a call from Casper Gutman, who wishes to meet him. Gutman opens their conversation with whiskey and says he will pay handsomely for the black bird. Spade bluffs, saying he can get it, but wants to know what it is first. Gutman refuses to offer any more information than that it is of unimaginable value. Spade leaves, only to be summoned to visit Gutman again later in the day. Spade disarms Wilmer before this next meeting, where Gutman tells him that the figurine was a gift from the Knights of Malta to the King of Spain, but was lost in transit. It was covered with fine jewels, but acquired a layer of black enamel to conceal its value.
Gutman had been looking for it for seventeen years. He traced it to Russian general Kemidov, and sent O'Shaughnessy to Constantinople to attempt to buy it. Kemidov, led to suspect its value from Gutman's interest in it, refuses to sell. O'Shaughnessy then recruits Cairo, a shady figure who inhabits the Levantine underworld, and the two steal it from Kemidov. (They later realize that Kemidov made the theft suspiciously easy, but they suspect nothing at the time.)
O'Shaughnessy, now set on keeping the falcon to herself, uses the story that she fears a double-cross by Cairo to recruit a new partner: Floyd Thursby, an American gunman who fled the U.S. to avoid going to prison. O'Shaughnessy and Thursby ditch Cairo by having him arrested for passing a fraudulent check. While he is in jail, they leave for Hong Kong.
While listening to Gutman's version of this story, Spade realizes that his whiskey has been drugged. Wilmer, described in the book as a "gunsel", or catamite (because of the book and subsequent film adaptations, the word would obtain a second meaning as a gun-carrying hoodlum), is boiling with rage not simply because Spade has taken away his pistols in the hallway but has treated him throughout with contempt. When Spade starts to fall to the floor from the knockout drops Gutman put in his whiskey, Wilmer trips him to send him sprawling. Spade then passes out, and Wilmer kicks him violently in the temple as he and Gutman leave.
After Spade returns to his office, Captain Jacobi of the La Paloma arrives, drops a package on the floor, and then dies. Spade opens the package, and finds the falcon. He receives a call from O'Shaughnessy, asking for his help. He stores the item at a bus station luggage counter and mails himself the collection tag. At the dock, the La Paloma is on fire. He goes to the address O'Shaughnessy gave him, and finds a drugged girl, her stomach scratched by a pin in order to keep her awake. She gives him information about Brigid, but it is a false lead.
When he returns to his apartment, O'Shaughnessy, Wilmer, Cairo, and Gutman are waiting. Gutman gives Spade $10,000 for the bird. Spade takes the money, but, in order to divide the gang, says that they need a "fall guy" to take the blame for the murders. Cairo and Gutman agree to give him Wilmer. Gutman proceeds to tell Spade the rest of the story. Gutman then warns Spade not to trust O'Shaughnessy. Spade calls his secretary and asks her to pick up the figurine. She brings it to Spade's apartment, and Spade gives it to Gutman. He quickly learns that it is a fake. He realizes that the Russian must have discovered its true value and substituted a copy. Meanwhile, Wilmer escapes. Gutman regains his composure, and announces that, though this has been a small setback, he intends to continue his quest for the falcon. Gutman asks Spade for the $10,000. Spade keeps $1,000 for expenses. Cairo and Gutman leave.
Immediately after Cairo and Gutman leave, Spade phones Sgt. Polhaus, telling him that Wilmer killed both Thursby and Captain Jacobi, and that Gutman, the man who gave the orders, is in a hurry to leave San Francisco. Spade then uses the impending arrival of the police to get O'Shaughnessy to admit to and explain why she killed Archer. She says she hired Archer to scare Thursby. When Thursby refused to be scared away, she took one of his guns — a very distinctive Webley, an English make — and herself lured Archer down an alley and killed him at point-blank range. She left the Webley at the scene to pin the crime on Thursby.
When Thursby was killed, she knew that Gutman must be in town, so she came back to Spade for protection. She now begs Spade to protect her from the law. (She and Spade have slept together in an earlier episode, and she believes that this has created a bond between them that she can exploit to her advantage.) However, Spade refuses: he is a detective, she killed his partner, and turning her in to the law has become a matter of honor. Spade points out that O'Shaughnessy, being an attractive woman and a gifted actress, may persuade a prosecutor and jury to let her off with a 20 year sentence. But if she is hanged, he sardonically adds, he will always remember her. O'Shaughnessy begs him not to turn her in, but he replies that he has no choice. When the police arrive, Spade turns over O'Shaughnessy. They tell Spade that Wilmer was waiting for Gutman at the hotel and killed him when he arrived.
Spade continues business as usual, though his secretary Effie Perine, whose woman's intuition had assured him that O'Shaughnessy was at bottom honest and trustworthy, is disappointed to learn that she was simply an unscrupulous adventuress. As the story ends, Spade wearily remembers that he still has to deal with Iva Archer, who had filed for divorce from her husband — his dead partner — and now seems to expect that he might marry her.