During World War II, McMahon was a fighter pilot in the United States Marine Corps serving as a flight instructor and test pilot. He was a decorated pilot and was discharged in 1946, remaining in the reserves.[5]
After college, McMahon returned to active duty. He was sent to Korea in February 1953. He flew unarmed O-1E Bird Dogs on 85 tactical air control and artillery spotting missions. He remained in the Marine Corps Reserve, retiring with the rank of Colonel in 1966 and was then commissioned as a Brigadier General in the California Air National Guard.
Several of his ancestors, including the Marquis d'Equilly, also had long and distinguished military careers. Patrice MacMahon, duc de Magenta was a Marshal of armies in France, serving under Napoleon III, and later President. McMahon once asserted to Johnny Carson that mayonnaise was originally named MacMahonnaise in honor of this ancestor, referring to him as the Comte de MacMahon.[6] In his autobiography, McMahon said that it was his father who told him of this relationship and he went on to suggest that he was not certain of the truth of the story.