"I don't want to be anywhere else," said the 40-year-old Wainwright, who has pitched for the team his entire career. "Who am I kidding?"
Terms of the deal were not yet available.
The right hander has had a solid 2021 campaign and will start the National League wild-card game for the Cardinals next week. He's 17-7 with a 3.05 ERA in 32 starts, including three complete games and a shutout. His 206 innings pitched so far are the most for him since 2014.
Wainwright has won 10 of his past 11 decisions with 11 quality starts during that span.
"Adam has been a constant for the Cardinals for nearly two decades, and he continues to perform at an elite level that is historic in nature," team president John Mozeliak said.
The three-time All-Star said the 2022 season would likely be his last, but he wouldn't commit to it. Neither would team owner Bill DeWitt Jr.
"We're thrilled that Adam will be with us next year and, who knows, maybe beyond," DeWitt said. "We look at him as a lifetime Cardinal and one whose legacy will remain among the top players forever."
Wainwright joined Hall of Famer Bob Gibson this season as the only Cardinals pitchers with 2,000 career strikeouts. The two-time World Series champion ranks third in team history for wins (184) and sixth in innings pitched (2,375 2/3).
His longtime battery mate, Yadier Molina, already agreed to return to the Cardinals in 2022 for the last season in his long career. The two had to wait until late last offseason before signing back with St. Louis.
This time around, the Cardinals took care of business before the offseason even began.
"My catcher, Yadi, coming back here was a big factor in me coming back also," Wainwright said. "He's more than a catcher to me. He's one of my closest friends. We've grown up together. We were kids together in the big leagues, and now we're the old geezers in the big leagues together."
Wainright and Molina have started 304 games together, which ranks fourth in MLB history for battery mates -- just 20 behind all-time leaders Mickey Lolich and Bill Freehan.