The deal was announced Thursday and puts Edwards, the current Sprint Cup Series points leader, in position to compete for his first Cup championship.
"I sincerely appreciate the amazing opportunity that Jack Roush has given me in this sport and am honored to race for him," Edwards said in a statement.
"As an organization, Roush Fenway provides the resources I need to win, and as a driver, that's the most important thing. We're having a fun season on the race track as we're leading the points and in great position for the Chase."
As the top free agent in NASCAR, Edwards had diligently researched all his options and appeared close to bolting for JGR. But Edwards was under increasing pressure to make a decision, even though he was steadfast in negotiating privately.
But four-time series champion Jeff Gordon said last weekend at Indianapolis Motor Speedway that there was no way the contract talks weren't a distraction to Edwards, and Edwards had no chance to win the title should he decide to leave Roush.
Roush teammate Greg Biffle then intimated Edwards was leaving the organization and needed to make the announcement so RFR could begin its plans for life post-Edwards.
Edwards again dismissed the chatter, and insisted he and crew chief Bob Osborne were professional enough to keep their focus on the track and not let the contract issues interfere with a championship run.
With the new deal, he doesn't have to discuss it again and can focus on winning a title. Edwards goes to Pocono Raceway this weekend with an 11-point lead over five-time defending series champion Jimmie Johnson.
"Carl Edwards has achieved a level of success on and off track that would put him at the top of the list for any race team," said co-owner Jack Roush. "Carl and the No. 99 team are having a terrific season again this year, and we're thrilled that our relationship will continue for many more."
Edwards has been with Roush since 2002, when the team gave him his break in NASCAR. It came in the Trucks Series, but Edwards was in Cup by 2004 as a late-season replacement for Jeff Burton.
He was a four-time Cup winner the next season and a bona fide NASCAR star, backflipping off the winning car in celebration of each victory.
Edwards' best season was 2008, when he won a series-high nine races and finished second to Johnson in the championship race. The next year, though, was a winless campaign, and the struggles of 2009 are thought to have played heavily in his decision to test the market.
But it was hard to argue that RFR had not come full circle since then, particularly with how well Edwards and teammate Matt Kenseth have run this season. Edwards won at Las Vegas and the All-Star race, and has been the points leader for 14 of 20 weeks this season. Kenseth has two wins and is ranked fourth in the standings.
Roush apparently sold Edwards on even more growth for an organization that has risen to the top of NASCAR and presently has the best engines in the Sprint Cup Series.
"We saw great potential in Carl a decade ago, and it's been a thrill to watch him grow into one of the sports' premier drivers behind the wheel of the No. 99," Roush said. "We didn't take our past success for granted when we sat down with Carl to talk about his future. As an organization, we approach each week with an intense focus on being successful in the race to come.
"Carl's position atop the points is a testament to that diligence."
But Edwards was still interested in what else might be out there, and JGR was a viable option. The team has two solid championship contenders in Kyle Busch and Denny Hamlin, but the team is struggling through an engine crisis and has lost at least 11 engines this season. Hamlin lost his during Friday's practice session at Indy, while Edwards was right behind him on the track.
It's unlikely that the engines played any role in Edwards' decision. But in the end, with a promise from manufacturer Ford for unprecedented incentives if he stayed, Edwards chose the team he's been with since the beginning.
It's a huge relief for RFR, which only has one of its four primary sponsors currently re-signed for next season. Losing Edwards would have left the organization in an even deeper hole, but signing him means it could be easier to put other deals in place.
"Carl brings a tremendous amount to the table from both a marketing and competitive standpoint," said Roush Fenway president Steve Newmark. "He has one of the largest fan bases in the sport, is able accomplish so much for his sponsors and is second to none on the race track. We're proud to have Carl as part of our roster going forward."
RFR has Kenseth, Biffle and Ragan under contract.
Follow Jenna Fryer on Twitter: www.twitter.com/JennaFryer