Terms of the deal were not disclosed. Alexander, 35, was scheduled to become an unrestricted free agent in March but had expressed his desire to play one more NFL season in Buffalo.
Alexander played in all 16 games last season for the Bills, starting eight. He finished second on the team, with 6.5 sacks, and had a career-high 2 interceptions and 9 passes defensed.
A team captain, Alexander was the Bills' selection for the Walter Payton Man of the Year Award in the each of the past two seasons.
Alexander contributed mostly on special teams for the Washington Redskins (2007-12), Arizona Cardinals (2013-14) and Oakland Raiders (2015) before signing with the Bills in 2016. He has started 35 games and has recorded 22 sacks for Buffalo over the past three seasons.