In London, a golden bullet with James Bond's code "007" etched into its surface is received by MI6. It is believed that it was sent by famed assassin Francisco Scaramanga, who uses a golden gun, to intimidate the agent. Because of the perceived threat to the agent's life, M relieves Bond of a mission revolving around the work of a scientist named Gibson, thought to be in possession of information crucial to solving the energy crisis with solar power. Bond sets out unofficially to find Scaramanga.
After retrieving a spent golden bullet from a belly dancer in Beirut and tracking its manufacturer to Macau, Bond sees Andrea Anders, Scaramanga's mistress, collecting golden bullets at a casino. Bond follows her to Hong Kong and in her Peninsula Hotel room pressures her to tell him about Scaramanga, his appearance and his plans; she directs him to the Bottoms Up Club. The club proves to be the location of Scaramanga's next 'hit', Gibson, from which Scaramanga's dwarf henchman Nick Nack steals the "Solex agitator", a key component of a solar power station. Before Bond can assert his innocence, however, Lieutenant Hip escorts him away from the scene, taking him to meet M and Q in a hidden headquarters in the wreck of the RMS Queen Elizabeth in the harbour. M assigns 007 to retrieve the Solex agitator and assassinate Scaramanga.
Bond then travels to Bangkok to meet Hai Fat, a wealthy Thai entrepreneur suspected of arranging Gibson's murder. Bond poses as Scaramanga, but his plan backfires because Scaramanga himself is being hosted at Hai Fat's estate. Bond is captured and placed in Fat's dojo, where the fighters are instructed to kill him. After escaping with the aid of Hip and his nieces, Bond speeds away on a long tail boat along the river and reunites with his British assistant Mary Goodnight. Hai Fat is subsequently killed by Scaramanga, who replaces Fat as the "new Chairman of the board" and takes the Solex.
Anders visits Bond, revealing that she had sent the bullet to London and wants Bond to kill Scaramanga. In payment, she promises to hand the Solex over to him at a boxing venue the next day. At the match, Bond discovers Anders dead and meets Scaramanga. Bond spots the Solex on the floor and is able to smuggle it away to Hip, who passes it to Goodnight. Attempting to place a homing device on Scaramanga's car, she is locked into the vehicle's boot. Bond sees Scaramanga driving away and steals a showroom car to give chase, coincidentally with Sheriff J.W. Pepper seated within it. Bond and Pepper follow Scaramanga in a car chase across Bangkok, which concludes when Scaramanga's car transforms into a plane, which flies him, Nick Nack and Goodnight to his private island.
Picking up Goodnight's tracking device, Bond flies a seaplane into Red Chinese waters, under the Chinese radar, and lands at Scaramanga's island. On arriving, Bond is welcomed by Scaramanga, who shows him the high-tech solar power plant he has taken over, the technology for which he intends to sell to the highest bidder. While demonstrating the equipment, Scaramanga uses a powerful solar beam to destroy Bond's plane.
Scaramanga then proposes a pistol duel with Bond on the beach; the two men later stand back to back and are ordered by Nick Nack to take twenty paces, but when Bond turns and fires, Scaramanga has vanished. Nick Nack leads Bond into Scaramanga's Funhouse where Bond poses as a mannequin of himself: when Scaramanga walks by, Bond takes him by surprise and kills him. Goodnight, in waylaying a Scaramanga henchman into a pool of liquid helium, upsets the balance of the solar plant, which begins to go out of control. Bond retrieves the Solex unit just before the island explodes, and they escape unharmed in Scaramanga's Chinese junk, later subduing Nick Nack who challenges them, having smuggled himself aboard.