McMahon or MacMahon (UK: /məkˈmɑːn/, US: /məkˈmæn, -ˈmeɪən, -ˈmɑːn/) (older Irish orthography: Mac Mathghamhna reformed Irish orthography: Mac Mathúna) is an Irish surname. The surname arose separately in two areas: in west County Clare and in County Monaghan. The County Monaghan (Airgíalla) MacMahons are not related to the County Clare (Thomond) MacMahons.
The Thomond MacMahons were part of the great tribal grouping, the Dál gCais, and claimed descent from Mahon O'Brien, grandson of Brian Ború. The last chief of the name was killed at the battle of Kinsale in 1602, and the chiefly line became extinct.
After the defeats of the native Irish in 17th century, many of the Clare MacMahons emigrated to serve in the Irish Brigade of the French Army. John Baptiste MacMahon, descended from the MacMahon female line, took on the surname of MacMahon and was the son of one of the original members of the Irish Brigade. He was made Marquis d’Eguilly by Louis XV. He had wanted to marry into a noble family but had to prove he was a noble. The name was changed through the female line because France recognised the line through a female, unlike Ireland to this day.