The Cardinals won for the 16th time in their last 19 games, assuring themselves no worse than a tie with the San Francisco Giants for the National League wild card.
St. Louis also began the day tied with Houston in the Central Division.
Beginning Friday, the Cardinals host the Astros in a season-ending, three-game series that will decide the Central Division title.
St. Louis trailed the Astros by 5 1/2 games on Sept. 24, but reeled off six straight wins before losing to the Brewers on Wednesday.
Morris (22-8) joined Arizona's Curt Schilling as the only 22-game winners in the major leagues. Pitching on manager Tony La Russa's 57th birthday, the righthander allowed three hits over six scoreless innings with three walks and 10 strikeouts.
He became the first St. Louis pitcher to reach 22 wins since Bob Gibson went 23-7 in 1970.
Morris has tossed 14 scoreless innings in his last two starts and is 10-1 in his last 12 outings.
McGwire had an RBI single in the first, a run-scoring groundout in the third and a three-run home run in the sixth that gave St. Louis an 8-0 lead. It was his 583rd career homer and 29th of the season.
Mike Timlin gave up an unearned run in the seventh before Steve Kline surrendered two runs in the eighth, including Richie Sexson's 44th homer. Sexson is one shy of Gorman Thomas' franchise mark set in 1979.
The Cardinals gave Morris a quick lead with two runs off Jimmy Haynes (8-17) in the top of the first on rookie Albert Pujols' RBI double and McGwire's single.
McGwire followed Jim Edmonds' RBI double in the third with a run-scoring groundout to make it 4-0.
Haynes surrendered four runs and five hits over four innings in his first start since Aug. 23. He made two relief appearances last week after missing a month due to an injured thigh.
Mike Matheny delivered an RBI single for the Cardinals in the fifth and Eli Marrero belted a two-run homer in the ninth.
Five Milwaukee pitchers combined to walk a season-high 11, including five by Haynes.