Anderson, 30, injured his left knee last October and played in just five games for Buffalo last season, finishing with just one sack, 10 tackles and a pass defensed.
He has 36.5 career sacks in 98 games with the Bears, Houston Texans, Patriots and Bills.
The Buffalo defense allowed 435 points last season, most in the AFC East. The Bills finished 6-10 and have since retooled their defense under new coordinator Mike Pettine. Anderson wasn't in the long-term plans.
The Bills also announced Tuesday that offensive lineman Chris Hairston will start training camp on the physically unable to perform list.
Hairston was expected to compete with Erik Pears for the starting right tackle position.
Information from The Associated Press was used in this report.