Octopussy is the thirteenth Eon Productions spy film in the James Bond series, and the sixth to star Roger Moore as MI6 secret agent James Bond 007. The film's title is taken from a short story in Ian Fleming's 1966 short story collection Octopussy and The Living Daylights, although the film's plot is original. It does, however, include a portion inspired by the Fleming short story "The Property of a Lady", while the events of the short story "Octopussy" form a part of the title character's background and are recounted by her.
British agent 009 is found dead at the British embassy in East Berlin, dressed as a circus clown and carrying a fake Fabergé egg. MI6 immediately suspects Soviet involvement and sends agent 007 James Bond to investigate, after seeing the real egg appear at an auction in London, ordering the agent to find out who the seller is. At the auction, Bond is able to swap the real egg with the fake, and engages in a bidding war with exiled Afghan prince Kamal Khan, forcing Khan to pay £500,000 for the fake egg. Bond follows Khan back to his palace in Rajasthan, India, where Bond defeats Khan in a game of backgammon. Bond escapes with his Indian colleague Vijay, evading Khan's bodyguard Gobinda's attempts to kill them both. Bond is seduced by one of Khan's associates, Magda, and notices that she has a blue-ringed octopus tattoo. Magda steals the real Fabergé egg fitted with a listening device by Q, while Gobinda captures Bond and takes him to Khan's palace. After Bond escapes from his cell he listens in on the bug in the Fabergé egg and discovers that Khan is working with Orlov, a renegade Soviet general, who is seeking to expand Soviet borders into Europe.
After escaping the palace, Bond infiltrates a floating palace in Udaipur, India, and there finds its owner, Octopussy, a wealthy woman who leads the Octopus cult, of which Magda is a part. In Octopussy's palace, Bond finds out that Orlov has been supplying Khan with priceless Soviet treasures, replacing them with replicas, while Khan has been smuggling the real versions into the West, via Octopussy's circus troupe. Orlov is planning to meet Khan at Karl-Marx-Stadt (Chemnitz) in East Germany, where the circus is scheduled to perform. After evading Khan's assassins, Bond goes to East Germany.
Bond infiltrates the circus, and finds that Orlov replaced the Soviet treasures with a nuclear warhead, primed to explode during the circus show at a US Air Force base in West Germany. The explosion would trigger Europe into seeking disarmament, in the belief that the bomb was a US one that detonated by accident, leaving its borders open to Soviet invasion. Bond takes Orlov's car, drives it along the train tracks and boards the moving circus train. Orlov is shot dead by GDR guards, while trying to cross the border. Bond kills the twin knife-throwers, Mischka and Grischka, in revenge for 009's death, and, after falling from the train, commandeers a car, in order to get to the Air Force base. At the base, Bond disguises himself as a clown to evade the West German police. He attempts to convince Octopussy that Khan has betrayed her, by showing her one of the treasures, found in Orlov's car, that she was to smuggle for him. Octopussy realises that she has been tricked and assists Bond in deactivating the warhead.
Bond and Octopussy return to India and launch an assault on Khan's palace. Khan and Gobinda flee the palace, capturing Octopussy in the process. Bond follows them as they attempt to escape in an aeroplane, clinging to the fuselage and disabling one of its engines. Gobinda dies after falling off the roof of the plane and Bond rescues Octopussy from Khan, the pair jumping onto a nearby cliff moments before the plane crashes into a mountain, killing Khan. While M and General Gogol discuss the return of the jewellery, Bond recuperates with Octopussy, aboard her private boat in India.