Imogen (or Innogen), daughter of the British king Cymbeline, is in love with Posthumus Leonatus, a man raised in her father's court who is described as possessing exceeding personal merit and martial skill. The two have secretly married, exchanging jewellery as tokens: a ring from Imogen, a bracelet from Posthumus. Cymbeline has discovered the affair and banishes Posthumus for his presumption, for Imogen is currently Cymbeline's only child and so her husband is heir to the British throne. Cymbeline did have two sons before Imogen, Guiderius and Arvirargus, but they were stolen twenty years before as infants by Belarius, a courtier banished as a traitor for supposedly conspiring with the Romans. Cymbeline is a vassal king of Caesar Augustus. Caius Lucius, a Roman ambassador, is on his way to demand the tribute that Cymbeline, under the influence of his wife the Queen, has stopped paying. The Queen is conspiring to have Cloten, her cloddish and arrogant son by an earlier marriage, married to Imogen. The Queen also is plotting to murder both Imogen and Cymbeline to secure Cloten's kingship, and to that end has procured what she believes to be deadly poison from the court doctor, Cornelius; Cornelius, however, suspects the Queen's malice and switches the "poison" with a drug that will cause the imbiber's body to mimic death for a while before reviving. Imogen meanwhile secludes herself in her chambers, resisting entreaties that she come forth and marry Cloten.
Posthumus flees to Italy to the house of his friend Philario/Filario, where he meets Iachimo/Giacomo. Posthumus waxes at length on Imogen's beauty and chastity, and Iachimo challenges him to a bet that he, Iachimo, can seduce Imogen and bring Posthumus proof of her adultery. If he wins, Iachimo will get Imogen's ring from Posthumus's finger. If Posthumus wins, not only must Iachimo pay him but also consent to a sword duel so that Posthumus may avenge his and Imogen's affronted honour. Iachimo heads to Britain where he aggressively attempts to seduce the faithful Imogen, who sends him packing. Iachimo then hides in a chest in Imogen's bedchamber and, when the princess falls asleep, emerges to steal from her Posthumus's bracelet. He also examines the room and Imogen's partly naked body for further proof. Returning to Italy, Iachimo convinces Posthumus that he has successfully seduced Imogen. In his wrath, Posthumus sends two letters to Britain: one to Imogen, telling her to meet him at Milford Haven, on the west coast of Wales; the other to Pisanio, Posthumus's servant left behind at court, ordering him to murder Imogen at the Haven. On the way the anguished Pisanio instead shows his letter to Imogen, revealing Posthumus's plot. He has Imogen disguise herself as a boy and continue to Milford Haven to seek employment. He also gives her the Queen's "poison," believing it will alleviate nausea from distemper and motion sickness. Imogen adopts the name "Fidele," meaning "faithful."
Back at court, Lucius receives Cymbeline's refusal of tribute, and warns him of Augustus's wrath. Meanwhile Cloten, incensed at Imogen's assertion that she values Posthumus's worst clothing over Cloten himself, learns of the "meeting" between the princess and her paramour at Milford Haven. Dressing himself in Posthumus's clothes, he determines to go to Wales and kill Posthumus while Imogen looks on, after which he will rape her on Posthumus's corpse before dragging her back to court for marriage.
Imogen's long journey to Milford Haven takes her into the Welsh mountains, where she becomes weak from hunger, but she luckily stumbles upon a cave and inside finds food. The cave is home to Belarius and his "sons" Polydore and Cadwal, whom he raised into great woodsmen. These young men are in fact Guiderius and Arviragus, who themselves do not know their origin, but are nevertheless possessed of royal passion and heartiness. The three men enter their cave and find "Fidele," and the young men are captivated by "his" beauty. Leaving "Fidele" to eat, the men are met outside the cave by Cloten, who insults them. After a brief fight, Guiderius kills Cloten and cuts off his head. Recognising the face, Belarius worries that Cloten's death will bring Cymbeline's wrath upon them. Meanwhile Imogen, feeling ill, takes the "poison," and when the men enter they find her "dead." They bewail "Fidele's" fate and, after placing Cloten's body beside her, solemnly depart. They also determine to fight for Britain in the inevitable battle with Roman forces. Imogen awakes to find Cloten's headless body, and takes it for Posthumus due to the fact the body is wearing Posthumus' clothes. She flees to Milford Haven, where "Fidele's" beauty earns "him" the affection of Lucius, who takes "him" on as a page. Meanwhile a guilt-ridden Posthumus arrives with the Roman army and dresses himself as a poor British soldier, hoping to die on the battlefield.
The battle goes badly at first for the Britons, but four unknown men—Belarius, Guiderius, Arviragus, and Posthumus in their disguises—turn the tide, rallying Cymbeline's troops into a rout of the Romans. Posthumus, still alive, gives himself up to Cymbeline as a Roman soldier, hoping to win his sought-for death by execution. He is put in chains and jailed, after which he falls asleep. The ghosts of his father (Sicilius Leonatus) and mother, who both died at Posthumus's birth, and his brothers, who died in battle, appear around Posthumus's sleeping body and complain to Jupiter of his grim fate. Jupiter himself then appears in thunder and glory on an eagle to chide the ghosts for their lack of faith. Before the god and spirits depart they leave a tablet on Posthumus's chest explaining in obscure prophecy how destiny will grant happiness to Posthumus and Britain. Posthumus awakens, believing he has dreamed the ghosts and god, but wonders what the tablet could mean. A jailer then summons him to appear before Cymbeline.
Posthumus stands in the ranks of prisoners with "Fidele," Lucius, and Iachimo, all condemned to be executed. Cornelius arrives from the court with a message that the Queen has died, and that on her deathbed she unrepentantly confessed to her murderous conspiracies. Both troubled and relieved at this news, Cymbeline prepares to carry out his sentence on the prisoners, but pauses when he sees "Fidele." Finding the "boy" both beautiful and somehow familiar, the king resolves not only to spare "Fidele's" life but also to grant "him" a favour. Imogen has noticed her ring on Iachimo's finger and demands to know from where the Italian got the jewel. A penitent Iachimo tells of his bet, how he could not seduce Imogen and yet tricked Posthumus into thinking he had. Posthumus then comes forward to corroborate Iachimo's story, revealing his identity and acknowledging his guilt and wrong in desiring Imogen dead. Ecstatic, Imogen throws herself at Posthumus, who still takes her for a boy and knocks her down. Pisanio then rushes forward to explain that the boy is Imogen in disguise; as the servant tries to help her up she pushes him away, under the impression that he worked with the Queen to poison her. Pisanio insists on his innocence, and Cornelius reveals how the poison was all along non-fatal. Belarius then speaks, noting how all this makes sense of the disappearance of "Fidele's" "corpse." Insisting that those who swore against him did so falsely, Belarius reveals Guiderius's and Arviragus's identities. With her brothers restored to their place in the line of inheritance, Imogen is now free to marry Posthumus. An elated Cymbeline pardons Belarius and all the prisoners. Posthumus produces Jupiter's tablet, still confused about its meaning, and Lucius calls forth his soothsayer Philharmonus, who deciphers the prophecy as a description of recent events, the unfolding of which has ensured happiness for all. Cymbeline decides to pay the tribute to Augustus as a gesture of peace between Britain and Rome, and invites everyone to a great feast.