In 1883, the volcano on the island of Krakatoa in the Netherlands East Indies begins to erupt, terrorizing the children at a mission school in Palembang on nearby Sumatra.
Meanwhile, across the Sunda Strait at her home port of Anjer on the west coast of Java, the steamer Batavia Queen, under the command of Captain Chris Hanson (Maximilian Schell), takes aboard passengers and cargo, including a diving bell and a balloon. Among the passengers coming aboard are Douglas Rigby (John Leyton), the designer, owner, and operator of the diving bell; Giovanni Borghese (Rossano Brazzi) and his son Leoncavallo (Sal Mineo), who own and operate the balloon as “The Flying Borgheses;” Harry Connerly (Brian Keith), a diver; Connerly’s mistress Charley Adams (Barbara Werle), who is a professional soprano and former saloon hostess; four female Japanese pearl divers led by Toshi (Jacqui Chan); and Laura Travis (Diane Baker), a married woman who had an extramarital affair with Hanson in Batavia.
Laura was married to an abusive man with whom she had a son named Peter. Her husband did not want the marriage but also threatened to take Peter away from her if she asked for a divorce. Wanting to be with Hanson, she had asked for a divorce anyway, and her husband had left her, taking both Peter and a fortune in pearls with him aboard the steamer Arianna. The Arianna had sunk off Krakatoa during a storm, and a guilt-ridden Laura, fearing that Peter had died aboard the Arianna and blaming herself for his death, had spent a year in a mental institution before coming aboard the Batavia Queen.
Hanson has organized the Batavia Queen’s voyage to find the wreck of the Arianna, salvage the pearls, and determine Peter’s fate – and to find Peter if he is still alive. Hanson plans to use a variety of techniques to search for the wreck and salvage the pearls, with the Borgheses’ balloon conducting an aerial search of shallow waters around Krakatoa, the pearl divers providing a mobile underwater search-and-salvage capability in shallow waters, Rigby in his diving bell searching in deeper water, and Connerly responsible both for recovering the pearls if they are in waters too deep for the pearl divers and for assisting in the heavy work of bringing the Arianna’s safe to the surface. Colonial authorities arrive just before the Batavia Queen departs and force Hanson to take 30 convicts and their jailer aboard for transportation to Madura Island, countering his argument that the ship is not equipped to accommodate them and has no room for them by telling him to transport the prisoners in the ship’s hold in appalling conditions. Hanson plans to deliver the convicts to Madura after recovering the pearls off Krakatoa. One of the prisoners, Lester Danzig (J. D. Cannon), is an acquaintance of Hanson’s, and Hanson allows him to make the voyage on deck instead of in the hold. Aware that Krakatoa has begun to erupt and warned by a colonial official that the island is a “raging volcano,” Hanson replies that the volcano had been quiet for the previous 200 years and posed no threat now.
During the Batavia Queen’s voyage to Krakatoa, her crew and passengers observe strange phenomena: They see seabirds swarming in huge flocks by day, witness a series of fiery explosions erupting from the sea one evening, and hear a high-pitched, ear-splitting hissing and whistling sound like that of escaping steam on another night. During a conversation on deck one night, Danzig discovers that Connerly is using laudanum to kill the pain of a lung disease which he is keeping secret from Hanson because it might interfere with his diving abilities. Danzig informs Connerly of Laura’s time in the mental institution, calling into question the veracity of her story about the pearls. The Borgheses, Connerly, Charley, Rigby, and Toshi confront Hanson about Laura’s mental state, but Hanson assures them that Laura’s story about the Arianna is true. Connerly takes so much laudanum that he hallucinates one night, attacks one of the pearl divers, and assaults several crewmen coming to her aid before they can subdue him. On Hanson’s orders, the Batavia Queen’s crew suspends Connerly in a slatted box above the main deck so that he will pose no danger to others aboard the ship; Charley tearfully pleads with Hanson for Connerly’s release, and Hanson relents and frees him. Meanwhile, Leoncavallo and Toshi take a romantic interest in one another.
The Batavia Queen arrives off Krakatoa to find the island shrouded in thick smoke. It clears when she anchors off the island, and the Borgheses ascend in their balloon while Rigby descends in his diving bell. The Borgheses quickly discover the wreck of the Arianna and guide the Batavia Queen and the submerged Rigby to it. Immediately afterwards, the motor driving the propeller that allows them to steer their balloon fails and they careen helplessly over Krakatoa and into its active crater. They jettison the useless engine and propeller into the crater’s lava lake to reduce weight and finally are blown clear of the crater by a volcanic explosion which sets their balloon afire. They drift away from the island, leap into the sea, and are rescued, but the fire destroys the balloon.
Danzig tells Hanson of Connerly’s lung problems, and Hanson decides that he will dive on the Arianna instead of Connerly. While Connerly and Hanson argue over this, Rigby’s diving bell becomes snagged on coral. The pearl divers, Hanson, and Connerly all dive into the water to free Rigby, and while they and the Batavia Queen’s other passengers and crew are thus occupied, Danzig steals a pistol he finds in the ship’s chart room, knocks the jailer unconscious, and frees the prisoners. They take over the ship, throw the unconscious jailer overboard to drown, and imprison the passengers and crew in the hold, where they also place Rigby and the pearl divers when they return to the Batavia Queen. Before returning, and unaware of the turn of events aboard the Batavia Queen, Hanson and Connerly swim to the wreck of the Arianna, find the ship’s safe, and attach a cable to it to have it hoisted aboard the Batavia Queen. Upon their return, Danzig has Connerly lowered into the hold but forces Hanson to look on at gunpoint as he opens the Arianna’s safe on the Batavia Queen’s deck. They find nothing in the safe but a cheap pocket watch. When an explosion on Krakatoa distracts Danzig, Hanson overpowers him, takes the pistol from him, pushes the heavy safe over onto one convict, shoots two others, and uses steam from a hose to force the rest of the prisoners to jump overboard. They swim to nearby Krakatoa, never to be seen again.
After Hanson frees the passengers and crew from the hold, Rigby finds another compartment in the safe which contains the Arianna’s logbook. Laura and Hanson examine the logbook for clues about Peter’s fate. The logbook reveals that the Arianna made a last port call at Palembang before sinking, and a letter tucked into the logbook says that Peter disembarked there to attend the mission school. Hanson decides to steam to Palembang to find Peter. By now, Krakatoa is erupting continually, and the volcano’s explosions begin to hurl lava bombs into the surrounding sea. A number of them strike the Batavia Queen as she gets underway for Palembang, starting fires which the crew puts out. As Toshi runs across the deck toward Leoncavallo, one of the lava bombs strikes and kills her.
The Batavia Queen arrives off Palembang to find the mission school heavily damaged, burning, and abandoned. Hanson hails a passing junk, and someone aboard the junk tells him that the staff and students of the school all are alive and had fled Palembang that morning aboard another boat, intending to sail to Java. The Batavia Queen soon comes to the assistance of an overcrowded and sinking sampan, which proves to be the school’s boat. The Batavia Queen’s passengers and crew rescue everyone aboard the sampan, including Peter, who has a joyful reunion with Laura. A chest belonging to Peter comes aboard the Batavia Queen during the rescue; it contains the pearls, and Connerly, Rigby, the Borgheses, and the three surviving pearl divers receive their shares of the fortune.
Krakatoa’s violent explosions become larger and continuous; Hanson assumes that they will generate a tsunami and begins to prepare the Batavia Queen to ride it out. Although Hanson assures him that a tsunami will destroy nearby Anjer and that he is safer at sea aboard the Batavia Queen if she can get to deep water in time, Connerly disputes the ship’s ability to survive and demands that Hanson allow those who wish to go ashore to row to Anjer with him in one of the ship’s lifeboats. Giovanni Borghese, Charley, and the three surviving pearl divers all join Connerly in the lifeboat and row to Anjer.
Krakatoa disintegrates in one final, cataclysmic explosion, which generates an enormous tsunami. It strikes Anjer shortly after the Batavia Queen’s lifeboat arrives there; unable to outrun the wave, Connerly and Charley embrace for the last time before the wave engulfs and kills them. At sea, Hanson, Laura, Peter, Rigby, Leoncavallo Borghese, the refugees from the mission school, and the ship’s crew ride out the tsunami successfully aboard the Batavia Queen.