Hughes' agreement was earlier reported by the Buffalo News.
Hughes, 26, has notched 20 sacks since the start of the 2013 season, tied for ninth in the NFL over that span.
The Bills acquired Hughes in a trade with the Indianapolis Colts for linebacker Kelvin Sheppard before the 2013 season, and Hughes flourished as a situational pass-rusher in then-defensive coordinator Mike Pettine's scheme, recording 10 sacks.
Hughes became a full-time starter under defensive coordinator Jim Schwartz last season, matching his sack total (10) from 2013 and adding a career-high three forced fumbles. Now he will be featured in a defense led by new coach Rex Ryan and defensive coordinator Dennis Thurman.
A first-round pick of the Colts in 2010, Hughes' career got off to a slow start. He started just seven games over his three seasons in Indianapolis, posting five sacks.
The Bills led the NFL in sacks (54) last season and had the NFL's second-most sacks (57) in 2013.
ESPN.com Bills reporter Mike Rodak contributed to this report.