Maelgwn ap Rhys (c. 1170–1230) was prince of part of the kingdom of Deheubarth in south west Wales.
Maelgwn was the son of Rhys ap Gruffydd (The Lord Rhys) by his wife Gwenllian ferch Madog, daughter of Madog ap Maredudd prince of Powys. He appears in the historical record for the first time helping at the siege of Tenby in 1187. In 1188 when Baldwin, Archbishop of Canterbury and Giraldus Cambrensis travelled through Wales raising men for the Third Crusade, Maelgwn is recorded as having taken the cross, though there is no record that he actually went on the crusade.
Maelgwn was described as being short in stature and a turbulent character, who caused his father much trouble in his later years and maintained a lengthy feud with his brother Gruffydd. He was kept a prisoner from 1189 to 1192. In 1194 he and his brother Hywel defeated their father in battle and imprisoned him in Nevern castle, though he was later released by Hywel. Maelgwn was in exile when Rhys died in 1197. Gruffydd had been recognised as his father's successor, but Maelgwn, helped by troops supplied by Gwenwynwyn ab Owain of Powys attacked and captured the town and castle of Aberystwyth, taking Gruffydd prisoner. Maelgwn handed Gruffydd over to Gwenwynwyn and took possession of Ceredigion. When Gwenwynwyn was defeated at Painscastle by Norman forces in 1198 Gruffydd was set free and recaptured all Ceredigion from Maelgwn except for the castles of Cardigan and Ystrad Meurig. Maelgwn came to an agreement with King John of England and sold Cardigan castle to John, taking possession of the remainder of Ceredigion himself. The annalist of Brut y Tywysogion commented: