Ryan, 52, spent the previous six seasons with the New York Jets, earning a 46-50 record and appearing in the AFC title game in each of his first two seasons. He led the team to a 4-12 record in his final season, missing the postseason for the fourth straight year.
His 50 regular and postseason wins rank third for the Jets, and his 4-2 postseason record was the best in the team's history.
Ryan's first year with the Bills will be his 19th season in the NFL.
During Ryan's tenure in New York, the Jets became one of the NFL's best defenses. New York ranked first in the league in passing yards allowed during his stint with the Jets and ranked second in total yards allowed per game over the same period.
Prior to assuming the head coach position with New York in 2009, Ryan spent 10 years with the Baltimore Ravens, coaching the defensive line from 1999 to 2004. He was named the team's defensive coordinator in 2005, helping Baltimore maintain its status as one of the league's best defensive teams.
In 2006, Ryan was named NFL Assistant Coach of the Year.
Buffalo head coach Doug Marrone opted out of his contract in December following a 9-7 season. The Bills have not made the playoffs since the 1999 season.
GALLERY: NFL Coaches Who Went Directly From One Top Job to Another
- Christopher Woody