Act I
On a rainy night in Edwardian London, the opera patrons are waiting under the arches of Covent Garden for cabs. Eliza Doolittle, a Cockney flower girl, runs into a young man called Freddy. She admonishes him for spilling her bunches of violets in the mud, but cheers up after selling one to an older gentleman. She flies into an angry outburst when she sees another man copying down her speech. The man explains that he studies phonetics and can identify any man's origin by his accent. He laments Eliza's dreadful accent, asking why so many English people can't learn to speak properly and explaining his theory that this is what truly separates social classes, rather than looks or money (Why Can't the English?). He declares that in six months, he could turn Eliza into a lady by teaching her to speak properly. The older gentleman introduces himself as Colonel Pickering, a linguist who has studied Indian dialects. The phoneticist introduces himself as Henry Higgins, and, as they both have always wanted to meet each other, Higgins invites Pickering to stay at his home in London. He distractedly throws his change in Eliza's basket, and she and her friends wonder what it would be like to live a comfortable, proper life (Wouldn't It Be Loverly?).
Eliza's father, Alfred P. Doolittle and his drinking companions Harry and Jamie, all dustmen, stop by the next morning. He is searching for money for a drink, and Eliza shares her profits with him (With a Little Bit of Luck). Pickering and Higgins are discussing vowels at Higgins's home when Mrs. Pearce, the housekeeper, informs Higgins that a young woman with a ghastly accent has come to see him. It is Eliza, who has come to take lessons to speak properly so she can get a job as an assistant in a florist's shop. Pickering wagers that Higgins cannot make good on his claim and volunteers to pay for Eliza's lessons. An intensive makeover of Eliza's speech, manners and dress begins in preparation for her appearance at the Embassy Ball. Higgins sees himself as a kindhearted, patient man who cannot get along with women (I'm an Ordinary Man). To others, he is self-absorbed and misogynistic.
It becomes evident to Alfred Doolittle that his daughter has been taken in by Professor Higgins. He decides that he may get a little money out of the dealing of his daughter (With a Little Bit of Luck [Reprise]).
Eliza's father arrives at Higgins' house the next morning, claiming that Higgins is compromising Eliza's virtue. Higgins is impressed by the man's natural gift for language and his brazen lack of moral values. He and Doolittle agree that Eliza can continue to take lessons and live at Higgins' house if Higgins gives Doolittle five pounds for a spree. Higgins flippantly recommends Doolittle to an American millionaire who is seeking a lecturer on moral values. Meanwhile, Eliza endures speech tutoring, endlessly repeating phrases like "In Hertford, Hereford and Hampshire, hurricanes hardly ever happen” (initially, the only "h" she aspirates is in "hever") and "The rain in Spain stays mainly in the plain" (to practice the "long a" phoneme). Frustrated, she dreams of different ways to kill Higgins, from sickness to drowning to a firing squad ("Just You Wait"). The servants lament the hard "work" Higgins does (The Servants' Chorus). Just as they give up, Eliza suddenly recites "The rain in Spain stays mainly in the plain" in perfect English. Higgins, Eliza, and Pickering happily dance around Higgins's study (The Rain In Spain). Thereafter her pronunciation is transformed into that of impeccable upper class English. Mrs. Pearce, the housekeeper, insists that Eliza go to bed; she declares she is too excited to sleep (I Could Have Danced All Night).
For her first public tryout, Higgins takes Eliza to his mother's box at Ascot Racecourse (Ascot Gavotte). Henry's mother reluctantly agrees to help Eliza make conversation, following Henry's advice that Eliza should stick to two subjects: the weather and everybody's health. Eliza makes a good impression at first with her polite manners but later shocks everyone by her vulgar Cockney attitudes and slang. She does, however, capture the heart of Freddy Eynsford-Hill, the young man whom she ran into in the opening scene. Freddy calls on Eliza that evening, but she refuses to see him. He declares that he will wait for her in the street outside Higgins's house (On the Street Where You Live).
The final test requires Eliza to pass as a lady at the Embassy Ball, and after weeks of preparation, she is ready. All the ladies and gentlemen at the ball admire her, and the Queen of Transylvania invites her to dance with her son, the prince (Embassy Waltz). Eliza then dances with Higgins. A rival and former student of Higgins, a Hungarian phonetician named Zoltan Karpathy, is employed by the hostess to discover Eliza's origins through her speech. Though Pickering and his mother caution him not to, Higgins allows Karpathy to dance with Eliza.
Act II
The event is revealed to have been a success and Eliza had fooled Zoltan Karpathy into believing that she is "not only Hungarian, but of royal blood. She is a princess!" After the ball, Colonel Pickering flatters Higgins about his triumph, and Higgins expresses his pleasure that the experiment is now over (You Did It). The episode leaves Eliza feeling used and abandoned. Higgins completely ignores Eliza until he mislays his slippers. He asks her where they are, and she lashes out at him, leaving the clueless professor mystified by her ingratitude. When Eliza decides to leave Higgins, he insults her in frustration and storms off. Eliza cries as she prepares to leave (Just You Wait [Reprise]). She finds Freddy still waiting outside (On the Street Where You Live [Reprise]). He begins to tell her how much he loves her, but she cuts him off, telling him that she has heard enough words; if he really loves her, he should show it ("Show Me"). She and Freddy return to Covent Garden, where her friends do not recognize her refined bearing (The Flower Market/Wouldn't It Be Loverly? [Reprise]). By chance, her father is there as well, dressed in a fine suit. He explains that he received a surprise bequest of four thousand pounds a year from the American millionaire, which has raised him to middle-class respectability, and now he must marry Eliza's "stepmother", the woman he has been living with for many years. Eliza sees that she no longer belongs in Covent Garden, and she and Freddy depart. Doolittle and his friends have one last spree before the wedding (Get Me to the Church on Time).
Higgins awakens the next morning to find that, without Eliza, he has tea instead of coffee, and he cannot find his own files. He wonders why she left after the triumph at the ball and concludes that men (especially himself) are far superior to women (A Hymn to Him). Pickering, becoming annoyed with Higgins, leaves to stay with his friend at the Home Office. Higgins seeks his mother's advice and finds Eliza having tea with her. Higgins's mother leaves Higgins and Eliza together. Eliza explains that Higgins has always treated her as a flower girl, but she learned to be a lady because Colonel Pickering treated her like a lady. Higgins claims he treated her the same way that Pickering did because both Higgins and Pickering treat all women alike. Eliza accuses him of wanting her only to fetch and carry for him, saying that she will marry Freddy because he loves her. She declares that she does not need Higgins any more, saying that she was foolish to think that she needed him (Without You). Higgins is struck by Eliza's spirit and independence and wants her to stay with him, but she tells him that he will not see her again.
As Higgins walks home, he realizes he's grown attached to Eliza (I've Grown Accustomed to Her Face). He cannot bring himself to confess that he loves her and insists that if she marries Freddy and then comes back to him, he will not accept her. However, he finds it difficult to imagine being alone again. He reviews the recording he made of the morning Eliza first came to him for lessons. He hears his own harsh words: "She's so deliciously low! So horribly dirty!" Then the phonograph turns off, and a real voice speaks in a Cockney accent: "I washed me face an' 'ands before I come, I did". Henry hears Eliza, who is standing in the doorway, tentatively returning to him. The musical ends on an ambiguous moment of possible reconciliation between teacher and pupil, as Higgins slouches and asks, "Eliza, where the devil are my slippers?"