Safety Dean Marlowe was released to clear a roster spot for Anderson, who joins Nathan Peterman in serving as backups to rookie starter Josh Allen for the Bills (2-3).
Peterman, who started the season opener against the Baltimore Ravens, has served as the backup to Allen, who was the seventh overall pick of the 2018 NFL Draft.
Anderson has spent the last seven seasons backing up Cam Newton with Carolina. Bills general manager Brandon Beane and head coach Sean McDermott were both in the Panthers organization before being hired by Buffalo last year.
The 35-year-old Anderson had a Pro Bowl season with the Cleveland Browns in 2007, when he passed for 3,787 yards and 29 touchdowns.
Anderson has completed 867 of 1,604 pass attempts for 10,413 yards with 60 touchdowns and 60 interceptions in 76 career games with the Arizona Cardinals, Browns and Panthers.
Allen has thrown for 748 yards with two touchdowns and four interceptions this season entering Sunday's road game against the Houston Texans (2-3).
The 6-foot-5, 237-pound Allen passed for 1,966 yards with 19 touchdowns last season at Wyoming. He ran the 40-yard dash at the NFL Scouting Combine in 4.75 seconds with a 33 1/2-inch vertical jump.
Marlowe was promoted from the practice squad on Saturday.