Cole (18-5) allowed two runs on six hits while striking out 10 to earn his 14th straight win as the 3-2 victory clinched at least a wild-card spot for Houston. He hasn't lost since May 22 against the White Sox, a span of 20 starts.
Cole struck out 10 or more for the seventh straight start, tying the club record set earlier this season by Justin Verlander.
"He's incredible," Houston manager AJ Hinch said. "He's a special player; he's a special person. It was a big night for him. That's a big accomplishment. He did it in a win. ... He's been a workhorse for us the entire year. These performances that he just rattles off [are] not easy. He makes it look a lot easier than it is."
Cole, the major league leader in strikeouts, became the third Astros pitcher to reach 300 strikeouts in a season, joining J.R. Richard, who had 313 in 1979 and 303 in '78, and Mike Scott, who struck out 306 in '86.
Cole reached the mark in 198 1/3 innings. According to Elias Sports Bureau data, that's the second-fewest innings pitched in major league history in a season at the time of a player's 300th strikeout, trailing only Randy Johnson (197 2/3 innings in 2001).
After striking out Choo to end the sixth, Cole leaped off the mound and was given a standing ovation as he walked to the dugout. Cole waved to the crowd with his glove hand and touched his chest with his throwing hand.
"At first, I didn't know that was the one," Cole said. "Then, it became pretty obvious, and I just wanted to spend a minute with the fans and thank them for the ovation and all the support."
Houston won its fifth straight and 100th game of the season, becoming one of six teams in major league history to win at least 100 games in three straight seasons. The Astros lost at least 100 games in three straight seasons from 2011 to '13.
"If you like winning, 100 three years in a row is a lot," Hinch said. "I love it for this team and for this organization. It's a big accomplishment. It's one step along the way for us and what we're trying to accomplish this season. I don't want that to be the high note by any means."
Information from The Associated Press was used in this report.