The film opens soon after the events of Casino Royale with Bond driving from Lake Garda to Siena, Italy. With the captured Mr. White in the luggage compartment of his car, Bond is attacked by pursuing henchmen. After evading his pursuers, and killing several of them, Bond arrives at an MI6 safe house.
M updates Bond on Vesper's boyfriend, Yusef Kabira, whose body had been found off the coast of Ibiza, however, the body is not Kabira's, leading M to conclude that he's still alive. Bond slyly pockets a picture of his former lover Vesper Lynd and Kabira.
Bond and M interrogate White regarding his secretive organization and it becomes apparent that MI6 knows little to nothing about them. White is quite amused and tells them that they "have people everywhere". At that moment, M's bodyguard, Craig Mitchell, reveals his allegiance to the organization by shooting the MI6 guard and attempting to assassinate M. Bond thwarts the attempt by throwing a chair at Mitchell; allowing M to escape. As Bond struggles with Mitchell, a stray bullet from Mitchell's gun hits White, who seems mortally wounded. Bond pursues Mitchell over several rooftops, eventually ending up in a building under renovation, momentarily causing chaos in the Palio di Siena horse race. A hand-to-hand fight ensues in a building containing renovation scaffolding. Bond and Mitchell lose their pistols. Bond is able to recover his own and kills Mitchell. When Bond returns to the safe house, he discovers White has escaped and the place is deserted.
Following a forensic investigation into Mitchell's apartment and the discovery of marked American currency, Bond heads to Port au Prince, Haiti to track down Mitchell's contact, Slate. Moments after Bond enters Slate's hotel room, Slate attacks Bond, and Bond is forced to kill him. Bond assumes Slate's identity and picks up a briefcase held for Slate at the front desk. As he exits the hotel, a Ford hatchback arrives and he is picked up by a woman named Camille Montes, who believes Bond is Slate. Examining the briefcase, Bond learns that Slate was sent to kill Montes at the behest of her lover, Dominic Greene, the chairman of an ecological organization called Greene Planet. Camille tries to shoot Bond and fails, and kicks him out of her car. Bond steals a motorcycle and follows her to the waterfront. While observing her meeting with Greene, Bond learns that Greene is helping a dangerous Bolivian general, Medrano, overthrow his government in exchange for a seemingly barren piece of desert. What he is unaware of is that Camille seeks revenge against Medrano after he murdered her family years ago.
Greene has Camille escorted away on Medrano's boat to "sweeten" their deal, but Bond rescues her. A furious boat chase takes place around the harbor and Bond thwarts Medrano's men and arrives at another landing, giving the unconscious Camille to someone to take care of her. Bond then follows Greene to a private jet, which flies him to a lavish performance of Puccini's Tosca at Lake Constance, Austria. On the plane, Greene meets with the CIA's section chief for South America, Gregg Beam, and Felix Leiter, who, when asked if he recognizes Bond from a picture, says he does not. Greene also confirms a deal he'd made with Beam to control whatever resources his organization finds in or under the seemingly worthless piece of desert in Bolivia. Beam assumes that Greene has discovered oil there.
Arriving in Austria, Bond discovers that Greene's organization is named "Quantum" and several members are attending Tosca. Bond infiltrates Quantum's meeting at the opera, stealing one of the member's earpieces, and listens in on their conversation which concerns their sinister business dealings around the world. Bond, announcing that Quantum should probably "find a more secure place to meet", tricks them all into standing up to leave so he can take photos of them. He transmits the photos back to MI6 where M's agents begin to identify them.
As Bond leaves the theatre, a gunfight ensues in a restaurant. A bodyguard of Guy Haines, an adviser to the British Prime Minister, is killed by Greene's men and Bond is framed. M has Bond's passports and credit cards revoked because she believes Bond has killed too many potential sources of information. Bond travels to Italy to reunite with his old ally René Mathis, whom he convinces to accompany him to La Paz, Bolivia, to investigate one of Greene's business dealings there. On the flight over, Bond drinks several of his signature martinis and broods over Vesper; he feels betrayed and heartbroken. In La Paz, they are greeted by Strawberry Fields, an MI6 field operative from the British Consulate, who demands that Bond return to the UK on the next available flight. Bond disobeys and, refusing to check into the seedy hotel Fields had chosen, checks into a luxury hotel with her (claiming to be teachers on sabbatical who have just won the lottery). Bond seduces her in their hotel suite.
Bond meets Camille again at a ecological fund-raiser being held by Greene, where she is busy spoiling the fun of Greene's party by pointing out his hypocrisy and lies to wealthy donors. Bond and Camille leave hastily together, but are pulled over by the Bolivian police. The police order Bond to pop the rear hatch of his car, revealing a bloodied and beaten Mathis. As Bond lifts Mathis out of the vehicle, the policemen shoot and fatally wound Mathis. After Bond subdues the police, he has a moment of relative tenderness with Mathis as the dying man asks Bond to stay with him. Mathis tells Bond that Vesper "gave everything" for him; his dying wish is that Bond forgive Vesper, and that he forgive himself.
After depositing Mathis' body in a waste container, Bond and Camille drive to Greene's intended land acquisition in the Bolivian desert and survey the area in a Douglas DC-3 plane. They are intercepted and shot down by an Aermacchi SF260 fighter and a Bell UH-1 Iroquois helicopter. They escape from the crippled plane by parachuting together into a sinkhole. While finding a route to the surface, Bond and Camille discover that Greene and Quantum is blockading Bolivia's supply of fresh water, normally flowing in subterranean rivers, by damming it underground. Bond also discovers that Camille has spent years plotting revenge on General Medrano for the murder of her family and that Bond foiled that plan in Haiti when he rescued her.
The two return to La Paz, where Bond meets M and learns Greene has killed Fields and left her sprawled on the bed, covered in petroleum. M tells Bond that Fields lungs are also full of the substance and that she was likely murdered by Quantum. Believing that Bond has become a threat to both friend and foe, and acting under higher orders, M orders him to disarm and end his activities in Bolivia. Bond escapes the agents who arrest him, defying M's orders to surrender. M tells her men to watch him because she thinks he is "on to something." Even though he has gone rogue, M confesses that she still has faith in him, and that he is "still [her] agent." Before he leaves, Bond demands that M include in her report that Fields performed her duties to the best of her ability.
By this point, both the American and British governments have agreed to work with Greene, because they think he has control of vast supplies of oil in Bolivia. Bond meets with Felix Leiter at a local bar. Like Bond, Felix thinks his government is on the wrong track. Leiter discloses that Greene and Medrano will meet at an eco-hotel, the Perla des las Dunas, in the Bolivian desert. Bond is forced to run when several CIA commandos suddenly appear and open fire.
At the meeting in the hotel, Greene pays off the Bolivian Colonel of Police, who organized the meeting. Greene then threatens Gen. Medrano into signing a contract granting Greene's company an overpriced proprietary utilities contract in Bolivia, which will be the only source for fresh water for the country. At first, Medrano refuses but Greene counters saying that Quantum is extremely powerful and influential, able to work with or topple any government or dictator and that Medrano could possibly be castrated and replaced with someone else if he does not agree to Greene's demands. Medrano gruffly signs the document and leaves with the money.
After the meeting, Bond kills off the Colonel of Police for betraying Mathis, and sets off a chain of explosions in the hotel when a hydrogen fuel tank is hit by an out of control vehicle. He battles hand-to-hand with Greene, who flees the hotel, limping from an injury to his foot. Camille foils Medrano's attempted rape of a serving girl, and after a fight (during which Medrano tells Camille that she has the "same frightened look" her mother had before he killed her), Camille shoots Medrano. Bond rescues Camille from the burning building, and captures Greene. After interrogating him, he leaves Greene stranded in the middle of the desert with only a can of motor oil. Bond tells him that he bets Greene will make it 20 miles across the desert before he considers drinking the oil, contrasting the resources of oil and water. Bond drives Camille to a train station, where she muses on what life holds for her now that her revenge is complete. They kiss briefly but passionately before she departs.
Bond travels to Kazan, Russia, where he finds Yusef Kabira. Yusef is revealed to be a member of Quantum who seduces high-ranking women with valuable connections, getting them to give up government assets as ransom for himself in fake kidnappings where he is supposedly held hostage. He'd previously tricked Vesper Lynd into the same sort of betrayal of MI6 and plans to do the same with Canadian agent Corinne Vaneau, even giving her the same kind of necklace he gave Vesper (an Algerian love knot). Surprising them at Yusef's apartment, Bond tells Corinne about Vesper and advises her to alert the Canadian Security Intelligence Service. Bond leaves Yusef's apartment and is confronted by M who is somewhat surprised that Bond did not kill Yusef, but rather left him alive for questioning. M reveals that Leiter has been promoted at the CIA to replace Beam, and that Greene was found dead in the desert, shot in the back of the head and with motor oil in his stomach. Bond doesn't volunteer any information on Greene, but tells M that she was right about Vesper. M then tells Bond that MI6 needs him to come back to the agency. Bond walks off into the night telling M that he "never left." As he leaves, he drops Vesper's necklace in the snow.
The traditional gun barrel sequence that opens nearly every film in the series (with the exception of this film's predecessor, Casino Royale) appears just before the closing credits.