McMahon is a lifelong resident of Staten Island. He is of German and Irish descent. He grew up in the Stapleton neighborhood on the North Shore and attended parochial schools. He graduated from New York University in 1979, later obtaining a law degree from New York Law School. He then worked for Democratic State Assembly members Eric Vitaliano and Elizabeth Connelly. He joined the staff of City Councilman Jerome X. O'Donovan, whom he succeeded in the Council. Prior to being elected to public office, McMahon worked as a partner at O'Leary, McMahon & Spero law firm in Staten Island.
McMahon served as the Chair of the New York City Council's Sanitation & Solid Waste Management Committee focusing on minimizing the use of trucks to transport garbage and also more evenly distributing the load of waste processing across the five boroughs.
On May 28, 2008, the Staten Island Democratic Committee endorsed McMahon to run for the Congressional seat in New York's 13th congressional district being vacated by retiring 12-year incumbent RepublicanVito Fossella. On September 9, 2008 McMahon defeated opponent Steve Harrison in the Democratic Party primary with 75% of votes to Harrison's 25%. Earlier, on June 11, 2008, McMahon had been endorsed by the city's 12 Democratic congressmen. The 13th had long been considered to be the most conservative district of the 13 that divided New York City. It was based in Staten Island, which is the base of the city's Republican Party. Although Democrats have a 17-point edge in registration, its voters are somewhat conservative on social issues and matters regarding "law and order", which kept Republicans in the seat for over a quarter century. However, the Republicans had considerable difficulty finding a replacement for Fossella on the ballot, eventually settling on former state assemblyman Robert Straniere. As a result, nearly all major pundits believed McMahon was almost certain to win the seat. In the November election, McMahon won in a landslide, taking 61 percent of the vote to Straniere's 33 percent. With his victory, New York City's congressional delegation became entirely Democratic for the first time in 76 years. This occurred despite the fact that John McCain narrowly carried Staten Island in the presidential election; a Democratic presidential candidate has carried Staten Island only Four times since 1952.
2010
McMahon was challenged by Republican and Conservative Party nominee Michael Grimm, a former FBI Special Agent, and Libertarian nominee Tom Vendittelli. Grimm won the election, defeating McMahon. He was one of a number of freshman Democrats who lost reelection in the GOP landslide of 2010.
2015
McMahon had publicly expressed a "serious interest" for retaking his old seat, now numbered as the 11th District, in the 2015 special election to replace his successor Michael Grimm. Grimm, who defeated McMahon for reelection in 2010, announced his plans to resign in January after pleading guilty to a felony tax evasion charge on December 23, 2014. McMahon, however, declined to run, deciding to enter the race for Staten Island District Attorney, and the Democratic nomination went to New York City Councilman Vincent J. Gentile, who was from the Brooklyn portion of the district. In November, McMahon defeated Republican candidate Joan Illuzzi for Staten Island District Attorney