McMahon was first elected as one of the two Members of Parliament (MPs) for County Wexford as a Radical[2] at the 1852 general election but shortly after joined the Independent Irish Party when it formed later that year. He held the seat until 1865, being re-elected as an Independent Irish Party candidate in 1857, and then as a Liberal Party candidate, upon its creation, in 1859.[3]