The sold-out crowd at Busch Stadium gave the newly inducted Hall of Famer a prolonged standing ovation after team owner Bill DeWitt made the announcement.
"You built a platform that we are happy to still have going today," said DeWitt. "We will permanently retire No. 24 in your honor today."
The 78-year-old Herzog was brought onto the field in a carriage pulled by two Clydesdales, Diamonds and Pops. Also in attendance were members of the 1985 National League championship team led by Hall of Famer Ozzie Smith.
"It's a wonderful experience," Herzog said. "I was recently inducted into the Hall of Fame in Coopertown, N.Y., and it was a wonderful honor. But let me tell you folks, to be here tonight with my number being retired at Busch Stadium in front of these players who are responsible for me being here and you fans, that's really great.
"I want to thank you Mr. DeWitt and the organization for this honor," he said. "I couldn't be happier. Thank you very much."
A spokesman for Missouri Gov. Jay Nixon declared Saturday to be Whitey Herzog Day in the state.
Herzog, a native of New Athens, Ill., was inducted into the Baseball Hall of Fame a week ago in Cooperstown, N.Y., along with outfielder Andre Dawson and umpire Doug Harvey.
Herzog managed 18 seasons. He spend 16 of them with St. Louis (1980-90) and Kansas City (1975-79). He won three division titles with Kansas City and two NL pennants with the Cardinals and one world championship in 1982.
As an outfielder with four teams from 1956-63, Herzog hit .257 with 25 homers and 172 RBIs.
Fans received a Herzog bobblehead doll at the game.
Some of the players on Herzog's 1985 National League championship team on hand for a 25th anniversary celebration were Jack Clark, Vince Coleman, John Tudor, Jose Oquendo, Andy Van Slyke, Tito Landrum and Danny Cox.
Other retired St. Louis numbers include Smith's No. 1, Red Schoendienst's No. 2, Stan Musial's No. 6, Enos Slaughter's No. 9, Ken Boyer's No. 14, Dizzy Dean's No. 17, 's Lou Brock's No. 20, Bruce Sutter's No. 42, Bob Gibson's No. 45 and No. 85 in honor of former owner August A. "Gussie" Busch Jr.