Ayotte first ran for the Peterborough city council in 1978, saying he did not want the only two other candidates in Ashburnham Ward to win without opposition. He finished at the head of the polls and was returned in every subsequent election until 1985. After a two-year break, he returned to council in 1987 and served until his first mayoral run in 2003. He was chair of the city's finance committee for sixteen years, chair of the planning committee for nine years, and deputy mayor for fifteen years. An editorial in the Peterborough Examiner describes him as having focused his attention on city-wide issues, rather than acting as a "parochial ward councillor." In 2003, he voted against a motion that advised the government of Canada to remain out of the American invasion of Iraq. He was quoted as saying, "I don't think I'm elected to advise the federal government on foreign policy."
Mayor
Ayotte first ran for mayor of Peterborough in the 2003 municipal election. He supported a controversial parkway extension from Clonsilla Avenue to Cumberland Avenue, an area that covered municipal green space. He also called for increased public transportation and greater private sector involvement in affordable housing. Fifty-nine years old at the time, he finished third against incumbent mayor Sylvia Sutherland. After the election, he wrote a series of columns on municipal politics for Peterborough This Week. When flood waters damaged more than three thousand homes in mid-2004, he was appointed to chair the Peterborough Area Flood Relief Committee. Ayotte was elected mayor on his second attempt in 2006, after Sutherland announced her retirement. As mayor, he has established an Action Committee on Poverty that identified six priority areas for investment, including a daywarming room, shelter services for adult women, and reduced transportation fare for people receiving Ontario Works benefits. He also recommended several procedural changes for council meetings in 2008. Peterborough This Week rated him as the best member of city council in its 2007 annual report card, notwithstanding what it described as his "low-key, cut-and-dry manner." His 2008 rating was somewhat lower, as the journal noted that some of his key proposals on poverty and procedural reform had not yet been fulfilled. In 2009, Ayotte appeared with federal and provincial representatives to announce more than three million dollars for affordable housing. Ayotte sought re-election in the 2010 municipal election and lost to local businessman Daryl Bennett. He indicated after the election that some of his financial backers from 2006 had shifted to Bennett's campaign.