McCullers is coming off a solid 2020 when he returned after missing a season following Tommy John surgery. He went 3-3 with a 3.93 ERA and 56 strikeouts in 11 starts.
The extension will start next season. McCullers and Houston had previously agreed to a one-year, $6.5 million contract for 2021 to avoid arbitration.
Earlier this year, he spoke of wanting to remain with the Astros, who drafted him 41st overall in 2012.
"Houston is where I want to be. This is my home. This is where I see myself," he said last month. "I would undoubtedly want to be here well into the future. You know, I think the real question would be, 'Do the Astros see me here? Do the Astros see me as part of their future?' If the Astros see me as part of their future, as a big part of the future, then I would love to stay here if it makes sense for everyone."
The Astros clearly felt the same, reaching the extension with the 27-year-old right-hander who's expected to be one of the leaders of their rotation with ace Justin Verlander out this season after having Tommy John surgery.
Overall, McCullers is 32-25 with a 3.70 ERA in five seasons with the Astros, including an All-Star campaign in 2017.
McCullers went from starter to postseason reliever in 2017, notably throwing 24 straight breaking pitches to earn his first major league save in a Game 7 ALCS closeout of the Yankees. McCullers also was on the mound for the start of Game 7 of the World Series against the Dodgers, opening with 2⅓ scoreless innings to send Houston on its way to a 5-1 championship-clinching win.