Private detective Philip Marlowe is summoned to the mansion of General Sternwood. The general wants to resolve the ‘gambling debts’ that his daughter Carmen owes to bookseller Arthur Gwynn Geiger. As Marlowe is leaving, Sternwood's older daughter, the divorced Mrs. Vivian Rutledge, stops him. She suspects her father's true motive for calling in a detective is to find his protégé Sean Regan, who had mysteriously disappeared a month earlier.
Marlowe goes to Geiger's shop, which is minded by Agnes Louzier, and then follows Geiger home. Hearing a gunshot and a woman’s scream, he breaks in to find Geiger's body and a drugged Carmen, as well as a hidden camera empty of film. After taking Carmen back home, he returns and discovers the body has disappeared.
Vivian comes to Marlowe's office the next morning with scandalous pictures of Carmen that she received with a blackmail demand for the negatives. Marlowe returns to Geiger's bookstore and follows a car to the apartment of Joe Brody, a gambler who previously blackmailed General Sternwood. He then finds Carmen in Geiger's house, where she insists that it was Brody who killed Geiger. They are interrupted by the house’s owner, small-time gangster Eddie Mars.
Marlowe goes to Brody’s apartment, where he finds both Agnes and Vivian. They are interrupted by Carmen, who wants her photos. Marlowe disarms her and sends Vivian and Carmen home. Brody admits that it was he who was behind the blackmailing, then has to answer the door and is shot. Marlowe chases the killer and apprehends Carol Lundgren, Geiger's former driver, who believes Brody is swindling him. Marlowe calls the police and arranges for them to come and arrest the killer.
Marlowe visits Mars' casino, where he asks about Regan, who is supposed to have run off with Mars' wife. Mars is evasive and tells Marlowe that Vivian is running up gambling debts. Vivian wins a big wager and then wants Marlowe to take her home. A stooge of Mars' attempts to rob Vivian, but Marlowe knocks him out. While driving back, Marlowe presses Vivian on her connection with Mars, but she admits nothing. Back at his own home, Marlowe finds a flirtatious Carmen waiting for him. She says she did not like Regan and mentions that Mars calls Vivian frequently. When she attempts to seduce Marlowe, he throws her out of his apartment. The next day, Vivian tells him he can stop looking for Regan; he has been found in Mexico and she is going to see him.
Mars has Marlowe beaten up to stop him investigating further. He is found by Harry Jones, an associate of Brody's who wants to marry Agnes. Jones conveys an offer from her to reveal the location of Mars' wife for $200. When Marlowe goes to meet him and be taken to where she is hiding, he spots Canino, a gunman hired by Mars, who is there to find Agnes himself. Canino poisons Jones after he discloses Agnes' location (which turns out to be false).
Agnes telephones the office while Marlowe is still there and he arranges to meet her. She reveals that she has seen Mona Mars behind an auto repair shop near a town called Realito. When he gets there, Marlowe is attacked by Canino. He wakes to find himself tied up, with Mona watching over him. Vivian is there too and frees Marlowe, allowing him to get to his gun and kill Canino. They drive back together and Marlowe calls Mars from Geiger's house, pretending to be still in Realito.
Mars arrives with four men, who set up an ambush outside. When Mars enters, Marlowe reveals that he has discerned the truth: Mars has been blackmailing Vivian, claiming that her sister Carmen had killed Regan. He then forces Mars outside, where he is shot by his own men. Marlowe then calls the police, telling them that Mars was the one who killed Regan. He also convinces Vivian that her sister needs psychiatric care.