Financial terms of the deal were not disclosed, but the new deal likely will lower Davis' cap number for this season and clear up more money for the Panthers to continue to tweak their roster.
The 32-year-old outside linebacker was set to count $9.9 million against the salary cap in 2015, the last year of his previous four-year deal.
"Signing this extension is something I've wanted to do all along and it just confirms that I now get to officially end my career as a Carolina Panther and that means the world to me," Davis said in a statement. "I'm extremely excited about being a part of this defense and I'm looking forward to doing my part to make sure that we become the No. 1 defense in the league."
The Panthers had made it clear they planned to sign the 2014 Walter Payton Man of the Year to an extension, and Davis has said repeatedly over the past few months that discussions were ongoing.
"Thomas has been and continues to be an integral part of our team on the field and off the field," general manager Dave Gettleman said in the statement. "His leadership is valuable and he is still playing at a high level. We're thrilled we could get this done. He's a lynchpin in our defense and we're excited that he's going to have the ability to retire as a Panther."
Davis was second on the team with 100 tackles in 2014, the third straight season he has had at least that many for the Panthers. He also had 2½ sacks, two forced fumbles and a fumble recovery.
Davis' resurgence for the Panthers the past three seasons came after the linebacker had missed most of the 2009, 2010 and 2011 seasons with knee injuries.
"This shows the commitment we've made to Thomas and the commitment he's made to us," coach Ron Rivera said in the statement. "He's been a great part of our success and now he has the opportunity to retire as a Panther. He's a unique individual and there really is only one Thomas Davis."
ESPN.com Panthers reporter David Newton contributed to this report.