Berry, who also played for the club from 1996-98, had been the Astros' hitting coach since June 2006.
"It was a difficult decision for us to make," general manager Ed Wade said. "In 34 years of baseball, Sean was the most prepared hitting coach I've been around. But the results speak for themselves."
Berry left the ballpark before the club played the Cardinals and was planning to fly home to California with his daughter. He said he didn't expect to be let go but handled the move with professionalism and class.
"I worked as hard as I can and did what I felt they told me to do, and they told me they didn't need my services anymore," Berry said. "You always know this is a business and stuff like this can happen and does happen. They have their reasons. The bottom line was I wasn't getting the job done. I'm sure my good friend will do a good job."
The Astros entered Sunday's action batting .235 as a team, which was the second-worst average in the National League. The team was also last in the NL in runs scored. Many of the Astros' best players have hit well below their career averages this year.
First baseman Lance Berkman was the first to admit he hasn't hit up to his ability this season with a .252 average and just 12 home runs. Berkman also raved about Berry's work ethic and said he will be missed.
"When things aren't going well with the players, you have to shake something up and the most expendable pieces are the coaching staff," Berkman said. "The team's offensive struggles in no way are a reflection of him as a hitting coach. We just didn't hit well. He just took the fall for us and it's unfortunate."
"Sean is somewhat a victim of circumstance because of the fact that our offense has struggled," Wade said. "We're better than this, and if we're not better than this, we're going to assess the talent of this club and act accordingly."
Bagwell had been serving as a special assistant to the general manager since his retirement in 2006. Over his 15-season career, he hit .297 and holds the Astros' franchise records with 449 home runs and 1,529 RBIs. He was also a four-time All Star who won the NL Rookie of the Year Award in 1991 and the NL MVP in '94.
"He not only had a great playing career, but I've also been very impressed that he's level-headed and he communicates very well with regard to the game," Wade said. "We've seen him have an impact with our Minor League hitters."
Bagwell worked with hitters in Spring Training and visited the Astros' Minor League clubs throughout the season. He also has worked with player evaluations.
Berkman said that the only silver lining out of losing Berry is the chance to work with Bagwell, who Berkman played with for seven seasons as a part of the famous "Killer B's."
"I think that Jeff has always been one of my mentors in the game," Berkman said. "I'm excited that he's going to be around more. I told him yesterday, he helps me more than anybody just from the things he told me when we played together."
Steve Gartner is an associate reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.