Lester, 37, hasn’t declared whether he intends to come back for a 17th season. The left-hander pitched for the Cubs for six seasons, including the 2016 World Series team.
Happ drove a 2-0 pitch from Luís Garcia (1-1) over the center-field wall for his career-high 25th home run of the season.
The blast made a winner out of Jason Adam (1-0), who pitched a perfect eighth. Rowan Wick picked up his fifth save as the Cubs sent the Cardinals to just their second defeat in their last 21 games.
Lester allowed at least one baserunner in each of his five innings and pitched out of a bases-loaded jam in fourth. He walked four, the last two to load the bases in front of Trayce Thompson, who burned Lester with his first career grand slam for a 4-1 lead in the fifth.
Dylan Carlson’s two-run single capped a three-run seventh, putting the Cardinals ahead 5-4.
Harrison Bader hammered a 92 mph sinker from Adrian Sampson over the left-field wall for his first career leadoff home run. It was the fifth time the Cardinals first batter of a game went deep this season and came in Bader’s 10th career game hitting atop the order.
Tyler O’Neill’s RBI triple in the fifth cut the Cubs lead to 4-2.
Sampson gave up just Bader’s long ball in his four innings. He pitched around clogged basepaths his first two innings and was aided by seven strikeouts.
Cardinals catcher Yadier Molina was back in the starting lineup after missing four games with right shoulder stiffness. He went 0 for 4.
With his pinch-hitting appearance in the fifth, Tyler Ladendorf became the 67th player used this season by the Cubs, tying the MLB record set by the 2019 Mariners.
Cubs: C Willson Contreras left the game in the third inning with right hip tightness. RHP Tommy Nance was placed on the injured list with no specifics given, and RHP Joe Biagini was selected from Triple-A Iowa.
Cardinals: RHP Genesis Cabrera (split fingernail) is expected to be available for the postseason. Cabrera left Friday’s game after walking three of the four batters he faced.
The Cardinals send RHP Jake Woodford (3-3, 3.88 ERA) to the mound in the regular season finale, while the Cubs counter with RHP Alec Mills (6-7, 5.09) on Sunday. Woodford had a 1.90 ERA in five September appearances, including four starts. Mills has allowed 3-plus runs in his last three and in five of his last seven starts.