While the H.M.S Pinafore is anchored at Portsmouth, Little Buttercup, a bumboat woman, tries to sell her goods to the sailors. It is soon revealed that one of the sailors, Ralph Rackstraw, is hopelessly in love with the Captain's daughter, Josephine. She however, is betrothed to the wealthy Sir Joseph Porter. Nevertheless, Josephine expresses her love for Ralph and wants to elope-scandalous due to their class differences. Meanwhile, Buttercup has fallen in love with the Captain, but he cannot return her love because of their difference in status. In the end, it is revealed that the Captain and Ralph had accidentally been exchanged at birth. Thus, the Captain can now marry Buttercup and Ralph can marry Josephine.