The deal is worth $80 million, a source told ESPN's Adam Schefter.
Acquired in an offseason trade with the New England Patriots, Cooks, 24, has yet to play a snap for the Rams, but coach Sean McVay liked what he saw from the receiver throughout the offseason program.
"Brandin Cooks has shown himself to be a class act on and off the field since the first day he joined our team," McVay said in a statement. "He's a proven professional in this league and signing him to a long-term contract was always our goal."
Cooks said he knew he wanted to sign a long-term contract shortly after arriving at the team's training facility and observing the culture established by McVay.
"Even before I got here, you saw something special going on with this team, with the coach, our great owner, and the teammates that I'm involved with," Cooks said. "It's a young culture that is very energetic."
The Rams are coming off an 11-5 season that included their first NFC West Division title in 14 years and their first playoff appearance since 2004.
A fifth-year pro, Cooks is entering the final season of his rookie contract, which is scheduled to pay him $8.4 million. His extension will keep him with the Rams through the 2023 season.
"I just knew that this is a place where I want to be for a really long time," Cooks said, adding, "I'm just excited to get Game 1 let alone six years. So that's what I'm focused on now."
Following receiver Sammy Watkins' decision to sign a free-agent contract with the Kansas City Chiefs, the Rams sent their No. 23 overall pick in the 2018 draft, as well as a sixth-round selection, to the Patriots in exchange for Cooks.
Last season, Cooks caught 65 passes for 1,082 yards and 7 touchdowns.
A first-round pick in 2014, Cooks played three seasons with the New Orleans Saints before the Patriots exchanged a first-round draft pick for him.
Cooks has 280 career receptions for 3,943 yards, including 27 for touchdowns.
He averages 14.1 yards per catch and is expected to provide a consistent deep threat for quarterback Jared Goff on a receiving corps that includes sixth-year pro Robert Woods, who is entering the second season of a five-year deal, and second-year pro Cooper Kupp.
The Rams have about $2.29 million remaining in salary-cap space, according to ESPN Stats & Information, and remain in the process of working on a long-term extension for reigning NFL Defensive Player of the Year Aaron Donald, who is scheduled to earn $6.9 million in the final season of his rookie contract.
The Rams open training camp on July 26.