Financial terms were not immediately disclosed.
Matthews spent the first three years of his career with the Eagles, and he put up 800-plus yards in each season. However, a 2017 trade to the Buffalo Bills interrupted his rise to stardom. He recorded then-career lows in both catches (25) and yards (282), partially because a knee injury cut his season short after 10 games.
The 6'3", 215-pound wideout signed a one-year deal with the New England Patriots last offseason but was released during the preseason after he suffered a hamstring injury.
That set the stage for a return to Philadelphia.
Matthews showed some promise during his second stint with the Eagles, hauling in 20 catches for 300 yards and two touchdowns. His 15.0 yards per reception established a new career high.
As Pro Football Focus noted back in May 2017, Matthews once settled among the most effective slot receivers in the league:
The addition should help bolster a San Francisco passing attack that ranked 15th in the NFL a year ago. Jimmy Garoppolo's early-season injury negatively impacted those numbers, but the receiving corps was also in need of a boost. Kendrick Bourne led all Niners receivers with 487 yards.
Tight end George Kittle did have a breakout season with 88 receptions for 1,377 yards and five touchdowns. But while the Pro Bowler provides Garoppolo with a reliable target over the middle of the field, San Francisco still needed to bring in some help at wide receiver.