Al-Muzaffar Mahmud was the Ayyubid emir of Hama first in 1219 (616) and then restored in 1229-1244 (626-642). He was the son of al-Mansur Muhammad and the older brother of al-Nasir Kilich Arslan.
In 1219, al-Mansur called together the leading men of Hama and made them swear allegiance to his eldest son, al-Muzaffar Mahmud, as his heir apparent, before sending al-Muzaffar to Egypt to aid Sultan al-Kamil. Some time later he sent his second son, an-Nasir Kilich Arslan to join Al-Muazzam in his campaigns in Palestine. However, as he lay dying some of the leading emirs decided to invite an-Nasir back to Hama to usurp the throne in place of his brother, in the hope that they would be able to exercise real control under his nominal rule. Al-Mansur died in January 1221 (Dhu’l Qa’da 617), and An-Nasir duly installed himself as ruler in Hama. In Egypt, when al-Muzaffar learned of his father’s death, he obtained Sultan al-Kamil’s permission to go and claim his throne. On reaching Syria however he found his brother firmly established on the throne. None of the notables of Hama would support him in removing An-Nasir, and none of the other Ayyubid princes in Syria was interested in helping him, so he had to return to Egypt, where he was given an estate by Al-Kamil.
Al-Muzaffar was eventually restored to Hama as a result of the changing balance of power between the major rulers of the Ayyubid family. In November 1228 (Dhu’l Hijja 625) negotiations took place at Tell el-'Ajul near Gaza between Aa-Kamil and his rival al-Ashraf as they sought to agree a balance of power between them across the Ayyubid realms. The result was a comprehensive agreement on redistribution of domains. Al-Kamil’s client al-Muzaffar was to be restored to Hama, together with Baarin and Maarrat al-Nu'man. Salamiyah was to be detached from the Hama domain and given to al-Mujahid of Homs.
Al-Ashraf and al-Kamil now worked in tandem to put this plan into effect, and Al Kamil led his armies to Damascus in support of al Ashraf who was laying siege to it. The city surrendered in June and almost at once, al-Kamil turned his attention to Hama. On 25 July 1229 (2 Ramadan 626) Al Kamil, in alliance with al-Mujahid of Homs, laid siege to Hama to remove Kilich Arslan and restore al-Muzaffar. After a few days of siege Kilich Arslan came out to negotiate, and eventually agreed to leave Hama in return for receiving the fortress of Baarin.