Matthews, who spent his first 10 NFL seasons with the Packers, can make up to $16.75 million on his new deal, NFL Network's Mike Garafolo reports.
The 32-year-old celebrated the move on Twitter.
Matthews is a six-time Pro Bowler and was the 2010 Defensive Player of the Year runner-up. He leaves Green Bay ranking first in franchise history in sacks (83.5) and tackles for a loss (121), and second in forced fumbles (15). He recorded 10-plus sacks in four of his seasons with the Packers.
The USC product joins a Rams defense that's lost safety Lamarcus Joyner and linebacker Mark Barron during free agency, with defensive tackle Ndamukong Suh also possibly set to depart. Matthews is the second major addition to the Rams' defense this offseason after the team acquired safety Eric Weddle last week.
Matthews, a Los Angeles native, accumulated 43 tackles, 3.5 sacks, and one forced fumble during the 2018 campaign.