The 30-year-old, who joined the club from Charlton Athletic in 2012, has made just one appearance this season.
Warburton told the club's official website: "We are pleased we have been able to reach an agreement with Paul. He can now get on with his career.
"We would like to wish Paul all the best for the future and thank him for his efforts during his time at Brentford."
Hayes, who started his career at Norwich City, has recently been on loan at Crawley Town and Plymouth Argyle.