He was a prince of Gwynedd, a younger son of Gruffydd ap Llywelyn and his wife, Senena, and thus grandson of Llywelyn the Great. During his career, Dafydd had repeatedly switched allegiances between his elder brother Llywelyn and King Edward I of England, but it was his rash attack on Hawarden Castle in March, 1282, that caused the final conflict with Norman England, in the course of which Welsh independence was lost. The last Prince of Gwynedd and Wales, he ruled only for a few months after Llywelyn's death, effectively an outlaw. Seeking refuge from the English forces in the mountains of Gwynedd, he was eventually captured and executed at Shrewsbury, and is identified by some sources as the first victim of the punishment for a new crime—High Treason. He died via disembowellment, having his intestines seared with a hot iron, hanging, and drawing and quartering. His two sons and several daughters, mostly by Elizabeth (or Eleanor) Ferrars, were sent to prison and convents respectively after his death, and none ever emerged alive to threaten English domination.
In 1241 he is recorded as having been handed over to Henry III of England as a hostage together with his younger brother, Rhodri, as part of an agreement.
After the arrest of Dafydd and Owain, followed over the next few days by the arrest of his wife and seven daughters, orders went out for the primogeniture of Dafydd to be apprehended, his firstborn Llywelyn ap Dafydd.
Dafydd had been married to Elizabeth Ferrers, daughter of William de Ferrers, 5th Earl of Derby.
Dafydd was with Llywelyn at the time, and it was arranged that Owain would come with armed men on February 2 to carry out the assassination; however he was prevented by a snowstorm.
Dafydd and Gruffydd fled to England where they were maintained by the king and carried out raids on Llywelyn's lands, increasing Llywelyn's resentment.
Dafydd's two surviving sons were captured and incarcerated at Bristol Gaol where they eventually died many years later.