On the aged wooden-walled warship HMS Battledore, now owned by a trust dedicated to rehabilitating young offenders, a quiet experiment in reform becomes the stage for a chilling crime. Miss Marple Margaret Rutherford arrives with a calm curiosity and witnesses the sudden death of a fellow trustee—someone who had just returned from a surprise visit to the ship and seemed deeply unsettled by what he had seen. The trustee dies before he can share his discovery, and a sample of his snuff is found to be poisoned.
Determined to learn what the trustee had seen, Miss Marple boards the Battledore while her confidant Jim Stringer Stringer Davis investigates on shore. Captain Rhumstone Lionel Jeffries takes an immediate dislike to her, and breaks the ice with a pointed barb aimed at First Mate Breeze-Connington William Mervyn. His unease grows when she announces she will remain aboard for several days and sleep in the captain's quarters, forcing him to relocate to the first mate's cabin.
That very night, Marple signals Stringer to tail the sailors who had just gone ashore. Stringer discovers they are robbing houses and, with their dinghy, rows back to the ship to report his findings. Lieutenant Compton Francis Matthews overhears their conversation and hurries down to tell the Captain, but is murdered with a sword and hanged from a mast.
Meanwhile, the investigation leaves a second victim: the assistant matron, Miss Pringle Edna Petrie, killed, apparently by a poison injection. Trafalgar Day, usually a buoyant aboard-the-ship celebration, is disrupted by the mounting tension. The Captain pins the blame on Miss Marple and begs Chief Inspector Craddock Charles Tingwell to remove her from the ship.
Marple then cooks up a trap. She convinces Craddock to permit the crew to go ashore for Trafalgar Day, and she hints that the killer will soon be named. With the crew ashore, Craddock and his Sergeant Bacon Terence Edmond hide aboard to observe. During her nocturnal sleuthing, Marple encounters Lieutenant Commander Dimchurch skulking about, who claims seasickness kept him behind. Undeterred, she searches for the crime's instrument and traces it to the ship's hidden machinery: a loaded mousetrap concealed inside a cannon barrel, along with a substantial stash of money.
Breeze-Connington confronts her with a raw confession: he has secretly embezzled the money over many years on the Battledore and has murdered three people to avoid exposure. He intends to kill Marple, seize the funds, and flee the country. Marple summons Craddock to press for an arrest, but Craddock and Bacon are trapped in their hiding space and cannot intervene. Breeze-Connington swings his sword at her, and a fierce duel ensues. Though he briefly gains the upper hand, Marple—an accomplished amateur fencer—holds her own. Just as he seems poised to deliver the coup de grâce, Stringer returns from his supposed shore mission and clubs him with a belaying pin, ending the threat.
Back ashore, Captain Rhumstone faces a court martial for failing to root out the embezzlement during his command. As he steps into the state-room to hear the verdict, he sees the sword laid out on the table, hilt toward him, and wrongly presumes he has been found guilty. Miss Marple corrects him: the board has found that he is not to blame. Relieved but weary of scandal, he nevertheless decides to resign, explaining that he has been having a long affair with the ship's matron. The pair now intend to marry, which would disqualify him from his post, so Marple urges him to continue as Captain, sparking a quiet, hopeful ending. He and the matron embrace joyfully.
With the ship's affairs resolved, Miss Marple steps into a waiting dinghy to depart, while the matron and captain wave him goodbye.