St. Louis Cardinals (1997–2001)
On July 31, having already amassed 34 home runs in the 1997 season, McGwire was traded from the Oakland Athletics to the St. Louis Cardinals for T. J. Mathews, Eric Ludwick and Blake Stein. Despite playing just two-thirds of the season in the American League, he finished ninth in home runs. In 51 games with the Cardinals to finish the 1997 season, McGwire compiled a .253 batting average, 24 home runs, and 42 RBI. Overall in 1997, McGwire led the majors with 58 home runs. He also finished third in the major leagues in slugging percentage (.646), fourth in OPS (1.039), fifth in OPS+ (170), tenth in RBI (123), and ninth in walks (101). He placed 16th in the NL MVP voting.
It was the last year of his contract, so there was speculation that McGwire would play for the Cardinals only for the remainder of the season, then seek a long-term deal, possibly in Southern California, where he still lived; however, McGwire signed a contract to stay in St. Louis. It is also believed that McGwire later encouraged Jim Edmonds, another Southern California resident who was traded to St. Louis, to forgo free agency and sign a contract with the Cardinals in 2000.
As the 1998 season progressed, it became clear that McGwire, Seattle Mariners outfielder Ken Griffey Jr., and Chicago Cubs outfielder Sammy Sosa were all on track to break Roger Maris's single-season home run record. The race to break the record first attracted media attention as the home-run leader changed often throughout the season. On August 19, Sosa hit his 48th home run to move ahead of McGwire; however, later that day McGwire hit his 48th and 49th home runs to regain the lead.
On September 8, 1998, McGwire hit a pitch by the Cubs' Steve Trachsel over the left-field wall for his record-breaking 62nd home run, setting off massive celebrations at Busch Stadium. The fact that the game was against the Cubs meant that Sosa was able to congratulate McGwire personally on his achievement. Members of Maris's family were also present at the game. The ball was given to McGwire in a ceremony on the field by the stadium worker who found it.
McGwire finished the 1998 season with 70 home runs (including five in his last three games), four ahead of Sosa's 66, a record that was broken three seasons later in 2001 by Barry Bonds with 73.
McGwire was honored with the inaugural Babe Ruth Home Run Award for leading Major League Baseball in home runs. Although McGwire had the prestige of the home-run record, Sammy Sosa (who had fewer home runs but more RBI and stolen bases) won the 1998 NL MVP award, as his contributions helped propel the Cubs to the playoffs (the Cardinals finished third in the NL Central). Many credited the Sosa-McGwire home run chase in 1998 with "saving baseball" by attracting new, younger fans and bringing back old fans soured by the 1994–95 Major League Baseball strike.
McGwire kept his high level of offensive production from 1998 going in 1999 while setting or extending several significant records. With 65 home runs, he led MLB for the fourth consecutive season. It was also his fourth consecutive season with at least 50 home runs, extending his own major league record. Sosa, who hit 63 home runs in 1999, again trailed McGwire. Thus, they became the first, and still only, players in major league history to hit 60 or more home runs in consecutive seasons; both players played on teams that finished below .500, which also made them part of dubious history as the first players with 60 home runs for teams with a losing record, a mark that has not been matched since (for all players with 50-HR seasons, McGwire is the only player to have three come on losing teams). McGwire also set a record from 1998 to 1999 for home runs in a two-season period with 135. He also owned the highest four-season home-run total, with 245 from 1996 to 1999. In 1999, he drove in an NL-leading 147 runs while only having 145 hits, becoming the first player with more RBIs than hits in a season.
Following the 1999 season, McGwire and the Cardinals exercised a mutual option in his contract for the 2001 season which would pay him $11 million for the 2001 season. Shortly before the 2001 season, McGwire and the Cardinals agreed to another extension through the 2004 season for $30 million which, according to Phil Rogers in the Chicago Tribune, was far less than he could have made in free agency.
However, in 2000 and 2001, McGwire's statistics declined relative to previous years as he struggled to avoid injury, specifically with his knee, which lessened his bat speed. McGwire missed two months of the 2000 season with patella tendinitis while noting his appreciation for coaching. In September, he was used primarily as a pinch-hitter. He played just 89 games and had 32 home runs. In the 2000 postseason, he was used a pinch hitter for six games, where he hit one home run (his fifth and final postseason home run) and walked twice as the Cardinals lost in the NLCS. He had surgery on his right knee to deal with tendinitis immediately the 2000 season ended. McGwire returned to play spring training and Opening Day in April (less than six months since the surgery), but his knee still bothered him, and after he went 2-for-21 (.095), he was moved to the disabled list on April 18. He ended missing a month. He ultimately played just 97 games that year and had 29 of his 56 hits go for home runs while batting .187. His last home run came on September 28 against Pittsburgh. In the NLDS, McGwire had just one hit in 11 at-bats and was pulled for a pinch-hitter in the 9th inning in decisive Game 5.
On November 11, 2001, McGwire announced his retirement, stating, "I am unable to perform at a level equal to the salary the organization would be paying me. I believe I owe it to the Cardinals and the fans of St. Louis to step aside, so a talented free agent can be brought in as the final piece of what I expect can be a world championship-caliber team."