In the wake of the tragedy that befell the Children of Llyr, Prince Pryderi of Dyved returns to his realm with Manawyddan, the last survivor of the family. There Pryderi is reunited with his wife Cigfa and Manawyddan marries Pryderi's mother Rhiannon.
An enchantment descends on the land, leaving it a wasteland empty of all domesticated animals and humans apart from the four protagonists. They support themselves by hunting at first, then move to the larger realm of Llogres where they make a living making saddles, shields and shoes. Their work is of such quality that the local craftsmen cannot compete, and drive them from town to town.
Finally they return to Dyved and become hunters again. Pryderi and Manawyddan follow a white boar to a mysterious castle. Against Manawyddan's advice Pryderi goes inside, and does not return. Rhiannon goes to investigate and finds Pryderi clinging to a bowl, unable to speak. The same fate befalls her, and the castle disappears.
Manawyddan and Cigfa return to Llogres as shoemakers, but are once again forced to leave so they return to Dyved. They sow three fields of wheat, but the first is destroyed before it can be harvested. The next night the second field is destroyed. Manawyddan watches over the third field, sees it destroyed by mice, and catches one of them. He decides to hang it for theft the next day.
Three strangers turn up in succession to offer him gifts if he will spare the mouse. Manawyddan refuses. Asked by the third stranger what he wishes in return for the mouse's life, he demands the release of Pryderi and Rhiannon and the lifting of the curse from Dyved. The stranger agrees to these terms, and his captives are freed and the land restored. He reveals himself as Llwyd, an ally of Gwawl, whom Pryderi's father Pwyll had beaten in order to get Gwawl to give up his right to Rhiannon's hand, which Gwawl had won from Pwyll by trickery. The mice who destroyed Manawyddan's crops were his attendants, magically transformed, and the one Manawyddan captured is Llwyd's own pregnant wife. He had placed the enchantment on Dyved in vengeance for Gwawl's beating and humiliation.