A Drax Industries Moonraker space shuttle on loan to the United Kingdom is hijacked in mid-air and MI6 operative, James Bond, agent 007, is assigned to investigate. En route to England in a small charter plane, Bond is attacked by the crew and pushed out of the plane by the mercenary assassin Jaws. He survives by stealing a parachute from the pilot, whilst Jaws lands on a circus tent.
Bond proceeds to the Drax Industries shuttle-manufacturing complex where he meets the owner of the company, Hugo Drax, and henchman Chang. Bond also meets an astronaut, Dr. Holly Goodhead and survives an assassination attempt via a centrifuge chamber. Bond is later aided by Drax's personal pilot, Corinne Dufour, as he finds blueprints for a glass vial made in Venice. Bond then foils another attempt on his life, using a hunting shotgun to shoot a sniper. Upon discovering that Dufour assisted Bond's investigations, Drax has her killed.
Bond again encounters Goodhead in Venice where he is chased through the canals by Drax's henchmen. He discovers a secret biological laboratory, and by accidentally poisoning the scientists there, learns that the glass vials are to hold a nerve gas deadly to humans, but harmless to animals. Chang attacks Bond and is killed, but during the fight, Bond finds evidence that Drax is moving his operation to Rio de Janeiro. Rejoining Goodhead, he deduces that she is a CIA agent spying on Drax. They promise to work together, but quickly dispense with the truce. Bond has saved one of the vials he found earlier, as the only evidence of the now-empty laboratory, giving it to M for analysis, who permits him to go to Rio de Janeiro under the pretence of being on leave.
In Rio, Bond meets his Brazilian contact Manuela. Drax hires Jaws to finish Chang's job of eliminating Bond. Bond meets Goodhead at the top of Sugarloaf Mountain, where they are attacked by Jaws on a cable car. After Jaws' car crashes he is rescued from the rubble by Dolly, and the two fall in love. Bond and Goodhead are captured by henchmen, but Bond escapes and reports to an MI6 base in Brazil and learns that the toxin comes from a rare orchid indigenous to the Amazon jungle. Bond travels the Amazon River looking for Drax's research facility and again encounters Jaws and other henchmen; a speedboat chase develops. Bond escapes from his boat just before it hits the Iguazu Falls, and finds Drax's base. Captured by Jaws again, Bond is taken to Drax and witnesses four Moonrakers lifting off. Drax explains that he stole the loaned Moonraker because another in his fleet had developed a fault during assembly. Bond is reunited with Goodhead; they escape and successfully pose as pilots on the sixth shuttle. The shuttles dock with Drax's space station, hidden from radar by a cloaking device.
Once on board the station, Bond and Holly disable the radar jamming cloaking device, resulting in the United States sending a platoon of Marines to intercept the now-visible space station. Jaws captures Bond and Holly and brings them to Drax.
Drax plans to destroy human life by launching fifty globes containing the nerve gas into the Earth's atmosphere. Before launching them, Drax also transported several dozen genetically perfect young men and women of varying races, to the space station. They would live there until Earth was safe again for human life; their descendants would be the seed for a "new master race". Bond persuades Jaws and Dolly to switch their allegiance by getting Drax to admit that anyone not measuring up to his physical standards would be exterminated and Jaws attacks Drax's guards.
A laser battle ensues both inside and outside the space station, in which Drax's guards and his master race are all killed. During the battle, Bond shoots Drax with a cyanide-tipped dart, then pushes him into an airlock and ejects him into space.
In order to destroy the three already launched globes and return to Earth, Goodhead and Bond use Drax's personal shuttle, while at the same time observing Jaws and Dolly escape from the disintegrating space station.