In 1986, Hayes was elected to the United States House of Representatives as a Democrat to fill the seat vacated by John Berlinger Breaux, the candidate instead elected to succeed the retiring U.S. Senator Russell B. Long. Hayes led five opponents in the nonpartisan blanket primary, including fellow Democrats Margaret Lowenthal of Lake Charles and James David Cain of Dry Creek in Beauregard Parish, both of whom were state representatives, and a Republican, David Thibodaux of Lafayette. In the general election, Hayes defeated Lowenthal, who had narrowly led Cain for the second position in the second round of balloting. In 1990, Hayes again defeated David Thibodaux. The tally was 103,308 for Hayes, 68,430 for Thibodaux, and 7,364 for another Democrat, Johnny Myers. In 1992, Hayes as a Democrat defeated his own brother, Fredric Hayes, a Republican, with whom he had quarreled. Hayes received 84,149 to his brother's 23,870. A second Republican, Robert J. "Bob" Nain, polled 7,184 votes. In 1994, Hayes defeated a comeback bid by former Congressman Clyde C. Holloway of Forest Hill in Rapides Parish, Holloway's Louisiana's 8th congressional district having been eliminated and dismembered after the 1990 United States Census. Hayes polled 72,424 votes to Holloway's 54,253. Another 7 percent of voters supported a candidate who ran as "No Party." In that same election, Hayes' former rival, David Thibodaux, was elected without opposition to the Lafayette Parish School Board. Hayes left the Democrats on December 1, 1995, and joined the Republicans. He was one of several Conservative Democratic lawmakers, mostly from the South, including Nathan Deal of Georgia, Mike Parker of Mississippi, Greg Laughlin of Texas and fellow Louisianan Billy Tauzin, to switch to the Republican party during that time, as the Republicans had taken majorities in Congress in the 1994 elections. Hayes then ran for the United States Senate in 1996. He finished fifth in the nonpartisan blanket primary with almost 72,000 votes. Republican Louis E. "Woody" Jenkins of Baton Rouge and Democrat Mary Landrieu of New Orleans then advanced to the tightly contested general election, which Landrieu narrowly won under protest. In 1997, when Hayes retired from the House after unsuccessfully running for the Senate, his House seat was taken by Democrat Chris John of Crowley in Acadia Parish. Hayes continues to be politically involved as a lobbyist. He appeared at a December 2008 event to raise funds for the successful reelection in 2010 of Republican U.S. Senator David Vitter.