Dinefwr first appears in history when it is recorded that in 1165 the fabled Lord Rhys ap Gruffydd "took...the castle of Dinefwr", maintaining it until his death in 1197. While the castle obviously existed before he captured it, it is presumed that the powerful conqueror and consolidator of the ancient Welsh kingdom of Deheubarth would strengthen and enhance his capitol seat in a manner commensurate with his stature.

By 1190 Dinefwr is described as one of three ancient Welsh royal seats, along with Aberffraw (Gwynedd) and Pengwern (Powys). In September 1220, Llywelyn the Great refers to Dinefwr in a letter to King Henry III as the "once famous, now ruined" castle.