=
Sir James Bond 007, a legendary British spy who retired from the secret service 20 years previously, is visited by the head of British MI6, M, CIA representative Ransome, KGB representative Smernov, and Deuxième Bureau representative Le Grand. All implore Bond to come out of retirement to deal with SMERSH who have been eliminating agents: Bond spurns all their pleas. When Bond continues to stand firm, his mansion is destroyed by a mortar attack at the orders of M, who is, however, killed in the explosion.
Bond travels to Scotland to return M's remains to the grieving widow, Lady Fiona McTarry. However, the real Lady Fiona has been replaced by SMERSH's Agent Mimi. The rest of the household have been likewise replaced, with SMERSH’s aim to discredit Bond by destroying his "celibate image". Attempts by a bevy of beauties to seduce Bond fail, but Mimi/Lady Fiona becomes so impressed with Bond that she changes loyalties and helps Bond to foil the plot against him. On his way back to London, Bond survives another attempt on his life.

Bond is promoted to the head of MI6. He learns that many British agents around the world have been eliminated by enemy spies because of their inability to resist sex. Bond is also told that the 'sex maniac' who was given the name of 'James Bond' when the original Bond retired has gone to work in television. He then orders that all remaining MI6 agents will be named "James Bond 007", to confuse SMERSH. He also creates a rigorous programme to train male agents to ignore the charms of women. Moneypenny recruits "Coop", a karate expert who begins training to resist seductive women: he also meets an exotic agent known as the Detainer.
Bond then hires Vesper Lynd, a retired agent turned millionaire, to recruit baccarat expert Evelyn Tremble, whom he intends to use to beat SMERSH agent Le Chiffre. Having embezzled SMERSH's money, Le Chiffre is desperate for money to cover up his theft before he is executed.
Following up a clue from agent Mimi, Bond persuades his estranged daughter Mata Bond to travel to East Berlin to infiltrate International Mothers' Help, a school for spies that is a SMERSH cover operation. Mata uncovers a plan to sell compromising photographs of military leaders from the US, USSR, China and Great Britain at an "art auction", another scheme Le Chiffre hopes to use to raise money: Mata destroys the photos. Le Chiffre's only remaining option is to raise the money by playing baccarat.
Tremble arrives at the Casino Royale accompanied by Lynd, who foils an attempt to disable him by seductive SMERSH agent Miss Goodthighs. Later that night, Tremble observes Le Chiffre playing at the casino and realises that he is using infrared sunglasses to cheat. Lynd steals the sunglasses, allowing Evelyn to eventually beat Le Chiffre in a game of baccarat. Lynd is apparently abducted outside the casino, and Tremble is also kidnapped while pursuing her. Le Chiffre, desperate for the winning cheque, hallucinogenically tortures Tremble. Lynd rescues Tremble, only to subsequently kill him. Meanwhile, SMERSH agents raid Le Chiffre's base and kill him for his failure.
In London, Mata Bond is kidnapped by SMERSH in a giant flying saucer, and Sir James and Moneypenny travel to Casino Royale to rescue her. They discover that the casino is located atop a giant underground headquarters run by the evil Dr. Noah, who turns out to be Sir James's nephew Jimmy Bond. Jimmy Bond secretly leaves the MI6 to defect to SMERSH to take a new role of killing spies. Jimmy reveals that he plans to use biological warfare to make all women beautiful and kill all men over 4-foot-6-inch (1.37 m) tall, leaving him as the "big man" who gets all the girls. Jimmy has already captured The Detainer, and he tries to convince her to be his partner; she agrees, but only to dupe him into swallowing one of his "atomic time pills", turning him into a "walking atomic bomb".
Sir James, Moneypenny, Mata and Coop manage to escape from their cell and fight their way back to the Casino Director's office where Sir James establishes Lynd is a double agent. The casino is then overrun by secret agents and a battle ensues. American and French support arrive, but just add to the chaos. Eventually, Jimmy's atomic pill explodes, destroying Casino Royale with everyone inside. Sir James and all of his agents then appear in heaven, and Jimmy Bond is shown descending to hell.