Both teams announced the transaction Friday.
Buffalo was busy on the trade front, also shipping Sammy Watkins and a sixth-round draft pick to the Los Angeles Rams in exchange for cornerback E.J. Gaines and a second-round pick in the 2018 NFL Draft.
After Watkins' departure, the Bills now have Anquan Boldin, Zay Jones, Matthews, Rod Streater, Corey Brown, Andre Holmes, Brandon Tate, Dezmin Lewis, Brandon Reilly and Rashad Ross on its depth chart at wide receiver.
Matthews, 25, is entering his fourth NFL season. The Vanderbilt product was a second-round pick in the 2014 NFL Draft. He has at least 103 targets in each of his first three seasons in the league. During his rookie campaign, Matthews had 67 catches for 872 yards and eight touchdowns. He snagged 85 receptions for 997 yards and eight scores in 2015. Last season he had 804 yards and three scores on 73 receptions in 14 games for the Eagles.
He is playing on the final year of his rookie contract and is due $1.09 million this season. Matthews had three catches for 18 yards Thursday in the Eagles' 24-9 loss to the Green Bay Packers at Lambeau Field. Watkins had four catches for 39 yards in the Bills' 17-10 loss to the Minnesota Vikings Thursday at New Era Field in Buffalo.
The Bills and the Eagles face off at 7 p.m. on August 17 at Lincoln Financial Field in Philadelphia in their second preseason contest.