The book begins where The Slippery Slope left off, with the Baudelaires traveling on a collapsing toboggan down the Stricken Stream of the Mortmain Mountains, leaving Quigley Quagmire floating in the opposite direction. They are washed into the ocean where they are caught on a submarine. They enter the submarine, which they discover is the Queequeg captained by Captain Widdershins, a V.F.D. member and old friend of the Baudelaire parents. Also on board is Widdershins’ stepdaughter Fiona and the ship’s cook, Phil, the Baudelaire’s optimistic past fellow worker at the Lucky Smells Lumbermill. The Baudelaires discover that the crew of the Queequeg are searching for the mysterious sugar bowl.
Klaus examined the tidal charts to estimate the location of the sugar bowl given the water cycle. He suspects it to be in the Gorgonian Grotto. An approaching submarine vessel on the sonar, in the shape of an octopus, captained by Count Olaf, but it is driven off by a mysterious ship which appears on the radar in the form of a question mark, which Captain Widdershins seems afraid of.
Fiona then looks in her mycological textbooks to discover information about the Gorgonian Grotto. It is a cone-shaped cave which houses a rare species of poisonous mushroom. They wax and wane periodically, but when the mushrooms are waxing, they are extremely deadly. The grotto is remote enough that it can quarantine the Medusoid Mycelium from the outside world. Fiona suspects there may be an antidote to the poisonous effects of the fungus.When the submarine arrives at the Grotto, Fiona, Klaus, Violet and Sunny are sent in. Inside it is filled with mainly junk, but also the breeding ground of the Medusoid Mycelium. While they are waiting for the Medusoid Mycelium to wane again, the children occupy themselves by investigating the knick-knacks lying around the cave, many of which seem to be connected to the V.F.D. Sunny picks up a tube of wasabi sauce.On returning to the submarine, they discover that a spore of the mushroom has infiltrated Sunny’s helmet while in the grotto. Fiona stops Klaus from opening the helmet, insisting that Sunny must remain in the helmet for their safety until she can find an antidote. Just as the ship starts up, Olaf’s submarine returns and he comes down to the children and tells them that he has been at the Hotel Denouement preparing for his final scheme, but he needed to find the sugar bowl to complete his plans. The orphans enter Olaf’s ship and are taken to the brig where they are interrogated by the hook-handed man, who is revealed to be Fiona’s brother – Fernald. Fiona begs him to help them get back to the Queequeg, for Sunny’s sake, and Fernald finally agrees on the condition that they take him along.
Back on the Queequeg, Sunny is very close to death. Klaus and Violet read Fiona’s texts and realize that the antidote is horseradish. Violet and Klaus begin to break down but have enough courage to open up the helmet containing Sunny, and Sunny saves her own life when she manages to blurt out one word, the culinary equivalent of horseradish: wasabi – what Sunny took from the grotto.
While Sunny recovers, the telegram machine starts back up again. The Voluntary Factual Dispatch they receive is from Quigley Quagmire, Quigley needs the Baudelaires at a certain coded location the next day, and just two days before the meeting at the Hotel. Klaus is first to solve the riddle: Quigley will meet them at Briny Beach. As Violet begins decoding the other part, they are discovered by Olaf and accomplices. Olaf announces triumphantly that they are just minutes from the Hotel Denouement and Fiona has joined his team to be with Fernald. Shortly after, on the radar, the mysterious question mark ship appears again. Olaf clearly knows what it is, as he orders everyone to battle stations to flee. Fiona, knowing that she has made the wrong decision, allows the Baudelaires to escape in the Queequeg.
The next day they arrive on Briny Beach – back where all of their troubles began. Surprisingly, Mr. Poe emerges from the fog. He received a message from the mysterious J.S. – whom he assumes is The Daily Punctilio’s reporter Geraldine Julienne – that he had to meet them at the beach. He tells the children to come with him to the police station to resolve all of their troubles. Violet, however, has Quigley’s decoded the message and has concluded that a taxi will be at the beach for them, and she sees it. They arrive at the taxi to find a woman at the wheel that they have never seen before and the orphans drive off with Kit Snicket to the Hotel Denouement.