In ancient Rome, some neighbors live in three adjacent houses. In the center is the house of Senex, who lives there with wife Domina, son Hero, and several slaves, including head slave Hysterium and the musical's main character Pseudolus. A slave belonging to Hero, Pseudolus wishes to buy, win, or steal his freedom. One of the neighboring houses is owned by Marcus Lycus, who is a buyer and seller of beautiful women; the other belongs to the ancient Erronius, who is abroad searching for his long-lost children (stolen in infancy by pirates).
One day, Senex and Domina go on a trip and leave Pseudolus in charge of Hero. Hero confides in Pseudolus that he is in love with the lovely Philia, one of the courtesans in the House of Lycus (albeit still a virgin). Pseudolus promises to help him win Philia's love in exchange for his own freedom. Unfortunately (as the two find out when they pay a visit on Lycus), Philia has been sold to the renowned warrior Miles Gloriosus, who is expected to claim her very soon. Pseudolus, an excellent liar, uses Philia's cheery disposition to convince Lycus that she has picked up a plague from Crete, which causes its victims to smile endlessly in its terminal stages. By offering to isolate her in Senex's house, he is able to give Philia and Hero some time alone together, and the two fall in love. But Philia insists that, even though she is in love with Hero, she must honor her contract with the Captain, for "that is the way of a courtesan." To appease her, he tells her to wait ("that's what virgins do best, isn't it?") inside, and that he will have the captain knock three times when he arrives. Pseudolus comes up with a plan to slip Philia a sleeping potion that will render her unconscious. He will then tell Lycus that she has died of the Cretan plague, and will offer to remove the body. Hero will come along, and they will stow away on a ship headed for Greece. Satisfied with his plan, Pseudolus steals Hysterium's book of potions and has Hero read him the recipe for the sleeping potion; the only ingredient he lacks is "mare's sweat", and Pseudolus goes off in search of some.
Unexpectedly, Senex returns home early from his trip, and knocks three times on his own door. Philia comes out of the house, and, thinking that Senex is the Captain, offers herself up to him. Surprised but game, Senex instructs Philia to wait in the house for him, and she does. Hysterium arrives to this confusion, and tells Senex that Philia is the new maid that he has hired. Pseudolus returns, having procured the necessary mare's sweat; seeing that Senex has returned unexpectedly and grasping the need to keep him out of the way, Pseudolus discreetly sprinkles some of the horse-sweat onto him, then suggests that the road trip has left Senex in dire need of a bath. Taking the bait, Senex instructs Hysterium to draw him a bath in the long-abandoned house of Erronius. But while this is happening, Erronius returns home, finally having given up the search for his long-lost children. Hysterium, desperate to keep him out of the house where his master is bathing, tells the old man that his house has become haunted – a story seemingly confirmed by the sound of Senex singing in his bath. Erronius immediately determines to have a soothsayer come and banish the spirit from his house, and Pseudolus obligingly poses as one, telling Erronius that, in order to banish the spirit, he must travel seven times around the seven hills of Rome (thus keeping the old man occupied and out of the way for quite a while).
When Miles Gloriosus arrives to claim his courtesan-bride, Pseudolus hides Philia on the roof of Senex's house; told that she has "escaped," Lycus is terrified to face the Captain's wrath. Pseudolus offers to impersonate Lycus and talk his way out of the mess but, his ingenuity flagging, he ends up merely telling the Captain that Philia has disappeared, and that he, "Lycus", will search for her. Displeased and suspicious, Miles insists that his soldiers accompany Pseudolus, but the wily slave loses them in Rome's winding streets.
Complicating matters further, Domina returns from her trip early, suspicious that her husband Senex is "up to something low." She disguises herself in virginal white robes and a veil (much like Philia's) to try to catch Senex being unfaithful. Pseudolus convinces Hysterium to help him by dressing in drag and pretending to be Philia, "dead" from the plague. Unfortunately, it turns out that Miles Gloriosus has just returned from Crete, where there is of course no actual plague. With the ruse thus revealed, the main characters run for their lives, resulting in a madcap chase across the stage with both Miles and Senex pursuing all three "Philia"s (Domina, Hysterium, and the actual Philia – all wearing identical white robes and veils). Meanwhile, the courtesans from the house of Marcus Lycus – who had been recruited as mourners at "Philia"'s ersatz funeral – have escaped, and Lycus sends his eunuchs out to bring them all back, adding to the general pandemonium.
Finally, the Captain's troops are able to round everyone up. His plot thoroughly unraveled, Pseudolus appears to be in deep trouble – but Erronius, completing his third circuit of the Roman hills, shows up fortuitously to discover that Miles Gloriosus and Philia are wearing matching rings which mark them as his long-lost children. Philia's betrothal to the Captain is nullified by the unexpected revelation that he's her brother, and, as the daughter of a free-born citizen, she's freed from Marcus Lycus. Philia weds Hero; Pseudolus gets his freedom and the lovely courtesan Gymnasia; Gloriosus receives twin courtesans to replace Philia; and Erronius is reunited with his children. A happy ending prevails for all – except for poor Senex, stuck with his shrewish wife Domina.