The team named bench coach Mike Shildt interim manager. The Cardinals also relieved hitting coach John Mabry and assistant hitting coach Bill Mueller of their duties.
"Mike Matheny has served the St. Louis Cardinals organization with tremendous dedication and pride and I am thankful for his service to the Cardinals over the past six and a half seasons," Cardinals chairman Bill DeWitt Jr. said in a statement. "On behalf of the entire Cardinals organization, I would like to wish Mike the very best."
It marks the first time the Cardinals have changed managers during a season since 1995, when Joe Torre was replaced by Mike Jorgensen.
Matheny, 47, joined the Cardinals following the 2011 season and agreed to a three-year extension after 2016. He went 591-474 with the team, leading it to postseason appearances from 2012 to 2015, including a World Series loss to the Boston Red Sox in 2013.
In 2015, the Cardinals won 100 games and finished with the best record in the majors, but their winning percentage has dropped each season since and they are currently in line to miss the postseason for a third straight year -- something they haven't done since 1997-99.
Saturday night's loss put them 7½ games behind the first-place Chicago Cubs in the National League Central.
"These decisions are never easy, but we felt that a change in leadership was necessary as the team prepares to enter into the second half of the season," president of baseball operations John Mozeliak said in a statement. "I would like to thank Mike for his exceptional commitment and devotion to the Cardinals organization, including many fond memories of our years working together."
This season started with promise.
The Cardinals acquired cleanup hitter Marcell Ozuna from the Miami Marlins during the offseason, and they had high hopes for right-hander Alex Reyes in his return to the rotation after missing all of last season following Tommy John surgery.
Ozuna has failed to live up to lofty expectations, hitting .268 with 10 home runs. Reyes missed the first two months of the season while rehabbing then was lost again for the year after injuring his shoulder in his first start back.
Dexter Fowler, in his second season since leaving the Cubs, has been at the center of the Cardinals' offensive woes -- hitting just .174 and being the focal point of reported clubhouse tension.
Matheny had limited the outfielder's playing time of late, and Mozeliak recently said he couldn't defend Fowler's "effort and his energy level.''
The Athletic cited multiple sources in reporting that Matheny and Fowler have barely spoken in months. The Athletic also reported this week about a rocky relationship between veteran closer Bud Norris and rookie setup man Jordan Hicks -- tension Hicks later downplayed.
The last team to fire a manager midseason when it was over .500 was the Milwaukee Brewers in 2008. Ned Yost was let go in the middle of a late-season slump, but the Brewers were 83-67 at the time and held on to reach the playoffs under Dale Sveum.
Matheny, meanwhile, is one of four managers to manage at least 1,000 games with St. Louis, along with Tony La Russa, Red Schoendienst and Whitey Herzog. The club is now set to hire its third manager since 1996, tied for the fewest in the majors (Braves, Yankees, Twins) over that span.
Information from The Associated Press was used in this report.