In Istanbul MI6 agents James Bond and Eve Moneypenny chase a mercenary, Patrice, who has stolen a computer hard drive containing details of undercover agents placed in terrorist organisations by NATO states. Patrice wounds Bond in the shoulder and, as the two men fight atop a train, Eve fires a distant shot with a rifle, inadvertently shooting Bond, allowing Patrice to escape. Bond falls into a river and goes missing, presumed to be dead.
In the aftermath of the operation M, the head of MI6, comes under political pressure to retire from Gareth Mallory, the Intelligence and Security Committee Chairman. On her return from the meeting, MI6's servers are breached and M receives a taunting message via computer moments before the offices explode, killing a number of employees. MI6 relocates to its emergency offices underground. Bond, having used his supposed death to retire, learns of the attack and returns to London. Although he fails a series of physical and psychological examinations, M approves his return to the field. Shrapnel taken from Bond's shoulder wound helps identify Patrice, and intelligence places him in Shanghai, where he is planning an assassination. Bond is ordered to identify Patrice's employer, recover the stolen hard drive and kill Patrice.
In Shanghai Bond follows Patrice into a skyscraper, from which the latter shoots his target. He and Bond fight, but Patrice falls to his death before Bond can learn of his employer. Searching Patrice's equipment, Bond finds a gambling chip intended as payment for the assassination, which leads him to a casino in Macau. Bond is approached by Séverine, whom he witnessed as an accomplice in the assassination, and asks to meet the person for whom she and Patrice work. She warns him that he is about to be killed by her bodyguards, but promises to help Bond if he will kill her employer. Bond defeats his attackers and joins Séverine on her yacht. They travel to an abandoned island off the coast of Macau, where they are taken prisoner by the crew and delivered to Raoul Silva. A former MI6 officer who had previously worked under M, Silva has turned to cyberterrorism, orchestrating the attacks on MI6. Silva kills Séverine, but Bond overpowers his guards and captures Silva for removal to Britain.
At MI6's underground headquarters Q attempts to decrypt Silva's laptop, but inadvertently enables it to access the MI6 systems, allowing Silva to escape from MI6 custody. Bond realises that Silva wanted to be captured as part of a plan to confront and kill M, whom he resents for leaving him to die after being captured years earlier. Bond gives chase through the tunnel network under London. Silva attacks M during a public inquiry into her handling of the stolen hard drive. Bond arrives in time to join Mallory and Eve in repelling Silva's attack, and M is hurried from the building by her aide, Bill Tanner.
Bond drives M to Skyfall, his family estate and childhood home in Scotland. Laying a trap, he instructs Q to leave an electronic trail for Silva to follow, a decision Mallory supports. Bond and M are met by Kincade, the Skyfall gamekeeper. The trio are only lightly armed, but they improvise a series of booby traps throughout the house. When Silva's men arrive, Bond, M and Kincade fight off the assault, although M is wounded. Silva arrives by helicopter to lead a much heavier second assault, and Bond sends M and Kincade off through a secret tunnel at the back of a priest hole to a chapel on the grounds. Bond detonates gas canisters with a stick of dynamite and retreats down the same tunnel as M and Kincade. The resulting blast causes the helicopter to crash, destroying the house and killing most of Silva's men.
Silva survives and, spotting Kincade's torch beam, follows Kincade and M to the chapel. He forces his gun into M's hand, begging her to kill them both. Bond, having been delayed fighting Silva's henchmen, arrives and kills Silva by throwing a knife into his back, but M succumbs to her earlier wound and dies. Following M's funeral, Eve—formally introducing herself to Bond as Miss Moneypenny for the first time—retires from field work to become secretary for the new head of MI6, Mallory, who assumes the title of M.