Aubrey and his crew are shipwrecked on a remote island in the South China Sea after surviving the destruction of HMS Diane in a typhoon. A cricket match is taking place between the sailors and marines, which keeps up the crew's spirits as they build the schooner needed for reaching Batavia. Maturin is killing game for the pot, particularly wild boar and babirussas. Dyaks, Kesegaran and her male assistants, arrive on the island. Speaking in Malay with Maturin, the Dyaks promise to take a message to Batavia in exchange for a note on Shao Yen for twenty "joes" (Portuguese Johannes coins), but instead return in a proa with 300 pirates, twice as many as the 150 Dianes. After killing and beheading the ship's carpenter and some other crew members while stealing tools, they attack the encampment and burn the schooner. They are routed after a bloody conflict and all pirates lost as their proa is sunk by the last remaining ball from the "long nine" gun, well-aimed.
On the last day of rum and tobacco supplies, Maturin meets four Chinese children collecting precious birds' nests from the surrounding cliffs. Maturin binds the boy's injured leg. They inform him their father's junk is on its way from Batavia to fetch a cargo of ore from Ketapan in Borneo. Maturin persuades the children's father, Li Po, to carry the remaining crew of the Diane in the empty holds of his roomy junk back to Batavia. It is intercepted by Wan Da, whom Maturin knows well from Pulo Prabang, and gains information about the French frigate nearly ready to sail. Upon arriving in Batavia, Aubrey is provided by Governor Raffles with a 20-gun ship which Aubrey renames Nutmeg of Consolation after one of the titles of the Sultan of Pulo Prabang. Asea, Aubrey hears from a Dutch merchantman that the French frigate Cornélie is watering at an island, Nil Desperandum.
Aubrey disguises the Nutmeg as a Dutch merchantman and, on being smoked, engages in battle with the Cornélie but has to turn tail. With the slower Cornélie in pursuit, Aubrey attempts to outwit her in the Salibabu Passage but is outmanoeuvred and nearly outgunned until, at the height of the chase, Nutmeg encounters the Surprise , under Commander Thomas Pullings, accompanied by the Triton , a British privateer. The Surprise gives chase; the Cornélie soon founders and the survivors, including Lieutenant Dumesnil, are taken on board the Surprise . Pullings has taken many prizes in the time they were parted, with two American privateers in convoy. The Nutmeg sails back to Batavia.
Resuming command of Surprise , Aubrey continues their interrupted journey to New South Wales. Stopping to collect fresh foods at Sweetings Island, Maturin rescues two young Melanesian girls, the sole survivors of an outbreak of smallpox. In New South Wales, Aubrey, Maturin and Martin are shocked at life in the penal colony under Governor Macquarie, no better than it was after the "Rum Rebellion". Aubrey and Maturin attend a formal dinner, hosted by Mrs Macquarie and the Governor's deputy, Colonel McPherson, at Government House. Captain Lowe insults Sir Joseph Banks and Maturin; Maturin fights and wins a duel against Captain Lowe on the spot. Maturin learns by letter that Sir Joseph Blaine could not transfer Maturin's funds to Smith's bank, so his fortune is not lost.
Dr Redfern takes Maturin to see Padeen Colman, recovering in the hospital from his severe flogging for absconding from the penal colony. Maturin and Martin journey inland of Sydney to examine the local flora and fauna and collect specimens. On a second trip, they stay with Paulton in the Hunter Region, and find Padeen in better shape, assigned to work out there as Maturin had arranged. The Irishman was convicted for stealing laudanum from an Edinburgh apothecary, meriting the punishment of transportation to this penal colony. Maturin tells Padeen to meet him at Bird Island on the day Surprise is to sail. This plan is checked by Aubrey, who promised to take no escaped prisoners, leaving Maturin in a quandary. Maturin hears from Hastings of the recently arrived Waverley that his wife Diana had a daughter in April, and he is overjoyed, but tells no one else his good news.
Maturin and Martin, keen to have one more look for the duck-billed platypus, locally named the 'water-mole', are taken on a final expedition in the cutter by Barret Bonden. Maturin and Martin search the local pools and spot two platypuses. Maturin manages to secure one - a male - in his net but his arm is pierced by its two poison-spurs. When the Surprise arrives to pick them up, Padeen is also taken aboard. To everyone's relief Maturin slowly regains consciousness after he is aboard.