Arrieta (10-5), coming off a one-hit shutout against Cincinnati last week, limited St. Louis to two hits and an unearned run while striking out 10.
The Cardinals, who clinched a playoff berth earlier in the week, remained 1 1/2 games ahead of Pittsburgh in the NL Central. The Pirates lost at Atlanta, reducing St. Louis' magic number to three for clinching the division title.
The Cardinals' loss assured NL East champion Washington will open a division series at home.
Lackey (3-3) gave up two runs and five hits in 6 2-3 innings. He struck out eight, his most since joining the Cardinals at the trade deadline.
Arrieta helped his own cause in the fourth inning. After Lackey intentionally walked Logan Watkins, Arrieta hit a two-run triple — the first triple of his career and the first by a Cubs pitcher since 2012.
The Cardinals were held without a hit through four innings but managed two singles in the fifth. Yadier Molina came in to score on Welington Castillo's throwing error, cutting the Cubs lead to 2-1.
Molina has hit safely in seven consecutive games and 12 of his past 14.
Chris Valaika had a pinch-hit RBI single in the eighth to extend the Cubs lead to 3-1.
The Cardinals mounted a two-out rally in the ninth, but Hector Rondon worked out of the jam for his 13th consecutive save and his 27th in 31 opportunities this season.
Arrieta has allowed two or fewer runs in 19 of 25 starts this season.
Cardinals: OF Jon Jay missed Wednesday's game due to a personal matter. He will rejoin the team on Friday in Arizona.
Cubs: LHP Eric Jokisch (0-0, 1.74) will make his first career start on Friday when the Cubs open a three-game set at Milwaukee.
Cardinals: RHP Michael Wacha (5-6, 3.18), who missed approximately three months earlier this season with a stress reaction in his throwing shoulder, starts for the Cardinals on Friday against Arizona.
Link to box score: Chicago (71-88) 3, St. Louis (88-71) 1
Join the pre-game, in-game and post-game discussion about each contest at The Cardinal Nation message board.