Madog ap Gruffudd or Madog ap Gruffudd Maelor, was Prince of Powys Fadog 1191-1236 in north-east Wales.
He was elder son of Gruffydd Maelor and his wife, Angharad, a daughter of Owain Gwynedd. He succeeded his father jointly with his brother, Owen in 1191 and on Owen's death in 1197 became the sole ruler of Powys north of the River Rhaeadr and the Afon Tanat.
Madog consolidated the possessions of his father, Gruffudd Maelor, and the territory he ruled became known as Powys Fadog in his honour, the remainder of the old kingdom formed Powys Wenwynwyn. (Fadog is a gender mutation of his name, Madog). After his death in 1236, this area — comprising Welsh and English Maelor, Ial, Cynllaith, Nanheudwy and Mochnant Is Rhaeadr — was still referred to as Powys Fadog although it was divided up between his five sons.
Madog was close to his cousin, Llywelyn ap Iorwerth, initially, but gradually distanced himself and also kept aloof from 1212 when his cousin had managed to reform the Welsh Confederacy and looked instead to King John of England, in whose pay he was, as an official ally of the English king. By 1215 he decided to ally with his cousin and remained so.
On 28 January 1201, Madog founded Valle Crucis Abbey, Llangollen, Wales, a Cistercian settlement, and the last Cistercian monastery to be founded in Wales. He is buried at Valle Crucis Abbey in the Abbey Church. The exact site of his burial is unknown.
He is either a great grandfather or great-great-great grandfather of Owain Glyndŵr.