Blaenllyfni Castle (Welsh: Castell Blaenllynfi) is a privately owned ruinous stone castle near the village of Bwlch in southern Powys, Wales. It was probably built in the early thirteenth century. It was captured several times during the rest of the century and apparently was never fully repaired afterwards and fell into ruins. It is a Scheduled Ancient Monument.
It was at the centre of the Fitz Herbert barony of Talgarth, which was created in 1208. The castle was therefore most likely constructed in 1208–15 and was briefly in the hands of the Braose family before it was returned to the Herberts in 1217–18. It was sacked by Prince Llywelyn ab Iorwerth and Richard Marshall in October 1233. Soon rebuilt, it was apparently taken by Llywelyn ap Gruffudd in 1262, but by September 1273 it had been retaken by Reginald fitz Peter fitz Herbert, who was chastised for his castle-taking activities. Around 1322 the castle was seized by the Crown and given to the Despensers. At the time of the execution of Hugh Despenser the Younger in 1326, it was nearly ruinous, probably having never been adequately repaired after the siege by Llywelyn ap Gruffydd. An inquisition by jury found many defects in the castle on 23 January 1337, although archaeological evidence shows that the defences were improved around this time.
The castle covered an area of approximately 78 by 56 metres (85 by 61 yd) within a moat with dimensions of 120 by 100 metres (130 by 110 yd). The remains of walls, buttresses and towers can be found inside and they have been partially excavated by the owner. The site is an Ancient Scheduled Monument.