The British warship H.M.S. Pinafore is at anchor off Portsmouth. The sailors are on the quarterdeck, proudly "cleaning brasswork, splicing rope, etc."
Little Buttercup, a Portsmouth "bumboat woman" (dockside vendor) – who is the "rosiest, roundest, and reddest beauty in all Spithead" – comes on board to sell her wares to the crew. She hints that she may be hiding a dark secret under her "gay and frivolous exterior." Ralph Rackstraw, "the smartest lad in all the fleet", enters, declaring his love for the Captain's daughter, Josephine. His fellow sailors (excepting Dick Deadeye, the grim and ugly realist of the crew) offer their sympathies, but they can give Ralph little hope that his love will ever be returned.
The gentlemanly and popular Captain Corcoran greets his "gallant crew" and compliments them on their politeness, saying that he returns the favor by never ("well, hardly ever") using bad language, such as "a big, big D" ["Damme"]. After the sailors leave, the Captain confesses to Little Buttercup that Josephine is reluctant to consider a marriage proposal from Sir Joseph Porter, the First Lord of the Admiralty. Buttercup says that she knows how it feels to love in vain. As she leaves, the Captain remarks that she is "a plump and pleasing person."
Josephine enters and reveals to her father that she loves a humble sailor in his crew, but she assures him that she is a dutiful daughter and will never reveal her love to this sailor.
Sir Joseph comes on board, accompanied by his "admiring crowd of sisters, cousins and aunts." He recounts how he rose from humble beginnings to be "ruler of the Queen's Navee" through persistence, although he has no naval qualifications. He then delivers a humiliating lesson in etiquette, telling the Captain that he must always say "if you please" after giving an order; for "A British sailor is any man's equal" – excepting Sir Joseph's. Sir Joseph has composed a song to illustrate that point, and he gives a copy of it to Ralph.
Elated by Sir Joseph's views on equality, Ralph decides that he will declare his love to Josephine. This delights all his shipmates except Dick Deadeye, who contends that "when people have to obey other people's orders, equality's out of the question." Shocked by his words, the other sailors force Dick to listen to Sir Joseph's song before they exit, leaving Ralph alone on deck.
Josephine now enters, and Ralph confesses his love in terms surprisingly and floridly eloquent for a "common sailor." Josephine is touched, but although she has found Sir Joseph's attentions nauseating, she knows that it is her duty to marry Sir Joseph instead of Ralph. Disguising her true feelings, she "haughtily rejects" Ralph's "proffered love."
Ralph summons his shipmates (Sir Joseph's female relatives also arrive) and tells them that he is bent on suicide. The crew expresses sympathy, except for Dick, who provides a stark counterpoint of dissent. Ralph puts a pistol to his head, but as he is about to pull the trigger, Josephine enters, admitting that she loves him after all. Ralph and Josephine plan to sneak ashore to elope that night. Dick Deadeye warns them to "forbear, nor carry out the scheme you've planned", reminding them of the disparity of their ranks ("She is a lady – you, a foremast hand!"), but the joyous ship's company ignores him.
Later that night, under a full moon, Captain Corcoran reviews his concerns: his "kindly crew" seems to ignore him, his daughter "to a tar is partial,"and Sir Joseph has threatened a court-martial.
Little Buttercup, listening to him sing, offers sympathy. He tells her that, if it were not for the difference in their social standing, he would have returned her affection. Stung by this rejection, she warns him that things are not all as they seem and that "a change" is in store for him, but he does not understand her cryptic warning.
Sir Joseph enters and complains that Josephine has not yet agreed to marry him. The Captain speculates that she is probably dazzled by his "exalted rank" and suggests that if Sir Joseph can persuade her that "love levels all ranks,",she will accept his proposal. They withdraw, and Josephine enters, still feeling guilty about her planned elopement with Ralph and fearful of giving up her life of luxury for that of the wife of a common sailor. When Sir Joseph makes the argument that "love levels all ranks," stressing that married happiness is not inconsistent with discrepancy in rank, Sir Joseph unwittingly pleads his rival's cause, and Josephine thereupon secretly decides to marry her lower deck lover. As the Captain and Sir Joseph rejoice, Josephine reveals that she is now determined to marry Ralph.
Staying behind to exult, the Captain's happiness is short-lived, because Dick Deadeye tells him of the lovers' plans to elope. The Captain confronts Ralph and Josephine and the pair declare their mutual love, justifying their actions because "He is an Englishman!" The furious Captain responds, "To seek your captain's child in marriage – why, damme, it's too bad!" Sir Joseph and his relatives, who have overheard this oath, are shocked to hear swearing on board a ship, and Sir Joseph orders the Captain to his cabin in disgrace.
When Sir Joseph asks what had provoked the Captain's unseemly outburst, Ralph replies that it was his declaration of love for Josephine. Furious in his turn at this revelation, and ignoring Josephine's pleas, Sir Joseph has the sailor "loaded with chains" and taken to the ship's dungeon.
All seems in ruins, when Little Buttercup comes forward to reveal her long-held secret. Many years ago, when she "practiced baby-farming", she had cared for two babies, one "of low condition", the other "a regular patrician." She confesses that she "mixed those children up… and that the wellborn babe was Ralph; your Captain was the other!"
Sir Joseph realizes that Ralph should have been the Captain, and the Captain should have been Ralph, and summons both; they emerge wearing one another's uniforms: Ralph as Captain, in command of the Pinafore, and Corcoran as a common sailor!
Since Sir Joseph's marriage with Josephine is now "out of the question" in his eyes ("love levels all ranks ... to a considerable extent, but it does not level them as much as that"), he yields her to Captain Rackstraw. The former Captain's now-humble social rank leaves him free to marry Buttercup.
Sir Joseph settles for his cousin Hebe, and all ends in general rejoicing.
The Young Victorian Theatre Company is a nonprofit professional summer repertory theatre.