Shildt had 10 first-place votes from the Baseball Writers' Association of America to Counsell's 13, but Shildt placed second on 14 ballots, as compared to just six for Counsell. Shildt, whose name appeared on 27 ballots, ended with 95 points, topping the 88 for Counsell, who was named on 24 ballots.
The Atlanta Braves' Brian Snitker, who won the award last season, finished a distant third.
Shildt teared up upon learning that he had won, saying he was already in an emotional place after his mother died Wednesday. The late Lib Shildt would take her son to the ballpark when she worked as an administrative assistant for the Charlotte O's, then the Baltimore Orioles' Double-A affiliate.
"My mom was remarkable,'' Shildt said. "... [I'm] appreciative of the time and love she and my dad invested in me,'' Shildt said.
Hospitalized for her final days, Shildt's mother repeatedly told her nurses how important it was that she live until Tuesday to find out if her son had won.
"She was emotional about knowing it was likely she wasn't going to be here,'' Shildt said. "I said, 'You know what? You're going to know before I am.'
"It still hasn't sunk in in total and I don't know if it ever will, ultimately, what that loss is going to feel like.''
While Shildt is the first manager of the year who never played professional baseball, working in the game was long his focus.
"I set my sights on being the best coach I could be, just like being the best player I could be, and the journey has led me here,'' Shildt said.
At the All-Star break, the Cardinals stood at 44-44 and in danger of missing the playoffs for a fourth straight season -- unthinkable for a franchise for which three playoff-less seasons in a row already was viewed as a disaster. The Cardinals turned it around, going 47-27 in the second half and pulling ahead of the Brewers and Chicago Cubs to win the NL Central with a 91-71 record.
The second-half run began immediately for the Cardinals, with 12 wins in their first 15 games after the break, including a four-game sweep at the Pittsburgh Pirates. They hosted the Cubs in late July with the teams tied for first and took two of three.
The Cardinals beat the Brewers in four of six games in August, but the biggest series of the season was a four-game weekend series Sept. 19-22 at Wrigley Field. The Cardinals began the series three games up on the Cubs and Brewers and won all four games -- all by one run -- for their first four-game sweep at Wrigley since 1921 and the first four-game sweep on the road with all wins by one run by any team since 1919.
In his first full season as Cardinals manager, Shildt managed around a mediocre offense that ranked 10th in the NL in runs scored. The Cardinals went from last to first in fewest errors committed and led the NL in stolen bases. Jack Flaherty's huge second half keyed the run, and the Cardinals had the second-best bullpen ERA in the NL at 3.82.
Counsell's Brewers entered September at 69-66, four games behind the Cubs for the second wild card, but also trailing three other teams. Even though MVP candidate Christian Yelich went down for the season on Sept. 10 with a fractured kneecap, the Brewers responded with their best month, going 20-7, including an 18-2 stretch that clinched the wild card, although they fell short by two games to the Cardinals in the NL Central.
It was the second straight strong September for the Brewers, and Counsell managed the pitching staff down the stretch as if every game were a postseason game, telling his starters not to leave anything on the table. The Brewers entered September with a 4.68 ERA but posted a 3.01 ERA the final month, best in the majors, with Counsell having quick hooks on his starters and taking full advantage of the expanded rosters with full use of his bullpen.
The Los Angeles Dodgers' Dave Roberts finished fourth in the award voting, and Washington Nationals manager Dave Martinez was fifth. Washington won the World Series, but voting concluded before the postseason began.
The Cardinals rewarded Shildt last week with a three-year contract extension.
He began his career in the Cardinals organization in 2004 as an area scout and short-season coach, before becoming manager of short-season Johnson City in 2009. He later moved up to become manager at Double-A and Triple-A, before joining the big league club in 2017 as quality control coach and then third-base coach.
The Associated Press contributed to this report.