The Cardinals have won nine straight for the first time since 2004 to solidify their grip on the second NL wild card. They remain three games ahead of Cincinnati for the final postseason spot, with San Diego four games back and Philadelphia 4½ games behind.
The longest winning streak in franchise history is 14 games, set in 1935.
Milwaukee's magic number over the Cardinals to clinch the division title remained at three.
"It's a nice round number and it looks better than 199," Lester said. "It's obviously awesome, but I'm kind of lacking words."
Cardinals manager Mike Shildt had plenty to say about Lester, whom the Cardinals acquired from Washington at the trade deadline.
"What a tremendous addition. He's done a great job," Shildt said. "This guy's got such heart. He's like John Wayne. He's got that true grit. Big, strong silent type. That's a heck of a milestone."
Lester retired 10 straight until giving up a single to Jackie Bradley Jr. with two outs in the fifth. Lester surrendered three runs and seven hits in six innings. He struck out two and didn't walk a batter in an efficient, 77-pitch outing.
Lester has worked five innings or more in 19 of 26 starts this year, including nine of 10 since joining St. Louis at the trade deadline.
Information from The Associated Press was used in this story.