 McMahon was born in Frederick County, Maryland, and graduated from St. Xavier College in 1849.He taught at Xavier for a year, and settled in Dayton, Ohio, in 1852.He studied law with his uncle, Vallandigham, and was admitted to the bar in 1854, forming a partnership with his uncle.