On the quarter-deck of H.M.S. Pinafore, Captain Corcoran and his crew await the coming of Sir Joseph Porter, who is going to inspect Corcoran’s ship and marry his daughter, Josephine. But Josephine is secretly in love with Ralph Rackstraw, a member of the crew. They attempt to elope but are apprehended. Through a strange twist Ralph and the Captain end up exchanging places, and all ends happily after all.