In Istanbul, MI6 agents James Bond and Eve 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 inadvertently shoots Bond, allowing Patrice to escape. Bond falls into a river and goes missing, presumed 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.
After Patrice kills his target, he and Bond fight. 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 approaches Sévérine, whom he witnessed as an accomplice in the assassination, and asks to meet her employer, Raoul Silva. She warns him that he is about to be killed by her bodyguards, but promises to help him if he will kill Silva. Bond defeats his attackers and joins Sévérine on her boat. They travel to an abandoned island off the coast of Macau, where they are taken prisoner by the crew and delivered to Silva. A former MI6 agent who had previously worked under M, Silva has turned to cyberterrorism, orchestrating the attacks on MI6. Silva kills Sévérine, 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. Realising Silva's capture was part of a plan to confront and kill M, 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 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. The second assault uses firepower from the helicopter, while Silva throws incendiary grenades into the building. 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, but M succumbs to her earlier wound and dies. Following M's funeral, Eve—formally introducing herself to Bond as Eve Moneypenny—retires from field work to become secretary for the new head of MI6, Mallory, who assumes the title of M.