Hayes was first elected to the Ontario legislature in the 1985 provincial election, defeating Liberal Jack Morris by about 1,300 votes in Essex North. He served as the NDP critic for Transportions and Communications, Tourism and Recreation, and Agriculture in the parliament which followed.
The Liberals won a landslide majority in the 1987 provincial election, and Hayes his seat lost to fellow Member of Provincial Parliament (MPP) Jim McGuigan, by 1,113 votes in the redistributed riding of Essex—Kent. He returned to parliament in the 1990 election, defeating McGuigan by 5,890 votes amid an unexpected provincial victory for the NDP under Bob Rae.
Notwithstanding his previous experience in the legislature, Hayes was not appointed to Rae's cabinet. He served as the parliamentary assistant to the Minister of Agriculture and Food from 1990 to 1993, and to the Minister of Municipal Affairs from 1993 to 1995.
The NDP were defeated in the 1995 provincial election, and Hayes finished third in Essex-Kent, finishing 2,293 votes behind the winning candidate, Liberal Pat Hoy. He sought a return to the legislature in the 2003 provincial election, but, although he was generally seen as a strong candidate, he lost to Liberal incumbent Bruce Crozier by about 8,000 votes in the riding of Essex.
In 1994, Hayes was one of twelve NDP MPPs who voted against the Rae government's plan to extend spousal benefits to same-sex couples. By the 2003 campaign, he had changed his mind on this issue.
Hayes was mayor of Lakeshore from 1997 to 2003, and is generally regarded as a popular figure within that community. He managed the campaign of Taras Natyshak, a family friend and NDP candidate in Essex in the 2006 federal election.