Financial terms were not disclosed and the contract extension covers the 2015-2017 seasons.
Matheny has a 185-139 record in his first two seasons as a manager. He took the Cardinals to the NLCS in his first season and to the World Series this season, losing in six games to the Boston Red Sox.
"You come in and try to do your job and want to try to represent the organization as a whole the best you can," Matheny said. "Fortunately, we've had a group of guys who've played extremely well in the two years I've been here. … I just can't imagine doing anything that I enjoy more than what I'm doing right now."