The deal is worth $135 million, including $87 million guaranteed, according to ESPN's Adam Schefter.
It's the richest defensive deal in NFL history and could keep Donald with the Rams through the 2024 season.
"I feel good right now," Donald said Friday after participating in an hour-long practice with the team. "Be back out here playing football again. That's what it is all about."
Rams general manager Les Snead said Donald arrived 35 minutes early to a meeting at the team's training facility Friday morning to finalize the deal.
"He was jacked," Snead said. "It was good to see him."
Donald's holdout lasted throughout training camp, but he will play in the team's season opener on Monday night, Sept. 10, against the Oakland Raiders.
Donald spent the offseason training at Pittsburgh, where he starred in college, working out with his former strength and speed coach.
"I feel good," Donald said. "Still got to get in football mode as far as pass-rush moves, and it's just knock the rust off a little bit. That'll come in a couple days."
The Rams have six scheduled practices before the opener. Coach Sean McVay said Donald would follow a similar template to last season -- when he held out until the eve of the opener and was activated in Week 2 -- with a few modifications.
"We've got a strategic plan over the next couple weeks to get him up to speed," McVay said. "Be smart where you're getting that physical work, but you want to make sure he's also fresh and ready to go for that date on Monday night."
A first-round pick in 2014, Donald was entering the final year of his rookie contract and was scheduled to earn $6.9 million this season.
Donald, a three-time All-Pro, four-time Pro Bowl selection and 2014 Defensive Rookie of the Year, has 39 career sacks and nine forced fumbles.
His contract resolution ensures that the Rams will open the season with their highly regarded defense intact. They traded for All-Pro cornerbacks Aqib Talib and Marcus Peters and signed All-Pro lineman Ndamukong Suh in free agency.
"To see him on the practice field now, that's what we set out to do," Snead said. "Now you just look forward to going and playing a game and seeing how that bunch jells and comes together."
Donald's extension has been a work in progress dating to 2017.
Negotiations began after the Rams' 4-12 2016 season, in which Donald, then a third-year pro, finished with eight sacks, five deflected passes and two forced fumbles.
Donald did not attend the voluntary offseason program but reported to mandatory minicamp to avoid fines. He then held out of training camp and reported to the team's practice facility on the eve of the 2017 season opener, without a new contract in place. He was activated in Week 2.
Donald's absence through training camp hardly affected his play, as he went on to finish his fourth season with 11 sacks and five forced fumbles in 14 games and was named the NFL Defensive Player of the Year as the Rams clinched the NFC West and made their first playoff appearance since 2004.
Donald then resumed his holdout pattern as the Rams entered the offseason. He did not attend organized team activities and did not report to mandatory minicamp.
While the Rams once feared that Donald could potentially miss part of the season, Snead said that a contract resolution began to take form before a preseason opener against the Baltimore Ravens more than three weeks ago.
Donald expressed relief Friday that the dispute was over.
"It was a stressful time for me," Donald said. "My family, they kept me focused, and I just kept working, kept grinding, had to trust the process.
"So, it's over and done with now, and I'm just happy to be here, back with my guys, back with these coaches and back playing football."