The deal links Matheny to the Cardinals through the 2017 season.
Matheny just completed his second season as St. Louis manager. The team is 185-139 under Matheny and made the playoffs each season.
The Cardinals, who tied the Boston Red Sox for the best record (97-65) in the majors this season, lost the World Series to the Red Sox.
"I do love what I do but to do it here in a place I call home is extremely special. I'm very grateful," Matheny said. "You come in and try to do your job and want to try to represent the organization as a whole the best you can. Fortunately, we've had a group of guys who've played extremely well in the two years I've been here."
Matheny took over the Cardinals after longtime Manager Tony LaRussa retired following the team's World Series win in 2011.
"I've always taken the position that the best way to operate a franchise and maintain continuity is to maintain the core personnel responsible for our success," Cardinals Chairman Bill DeWitt Jr. said at a news conference.
The Cardinals also said Wednesday pitcher Chris Carpenter was retiring.
Carpenter, 38, won the Cy Young Award in 2005 and was a three-time All-Star. He was voted Comeback Player of the Year in 2009 when he went 17-4 with a 2.24 earned run average.
Carpenter played six seasons with the Toronto Blue Jays and nine with the Cardinals. He was 144-94 in his career with a 3.76 ERA. He had a 21-5 record and 2.82 ERA with four shutouts in 2005 when he won the Cy Young Award.