Samardzija (8-10) allowed one run and four hits. He also fanned 11 at Atlanta on July 2.
After striking out the side in the fourth, he fanned Jason Castro leading off the fifth for his fifth consecutive strikeout.
"I knew I was on a good run in (the) middle of the game, but Garza came up to me after the game and said, 'Can't get that elusive 12.' Whatever. He has a way of letting me know. If anyone is not paying attention, he is," Samardzija said.
Chicago won for just the second time in 13 games. The Astros have lost 25 of their past 27 road games.
The crowd of 31,452 was the smallest of the season at Wrigley Field.
The Astros, who have the worst record in the majors, got their run on the first career homer by rookie Brandon Barnes, a pinch-hit shot in the sixth.
Armando Galarraga (0-3) was tagged for five runs and seven hits.
"Two home runs cost me the game. Believe it or not, it was a better start than the last couple. I threw more strikes, threw everything I wanted to. I just missed those two. Soriano, it was the first pitch. He got me. The first one hurt because it was a bad pitch," Galarraga said.
Samardzija went into the game with the second-lowest run support in the majors at 3.19. Chicago had scored two or fewer runs for him in 11 of his previous 12 outings.
"Sure. It's something to think about when a teammate is out there battling, picking up quality starts, and you're not scoring any runs for him," Barney said.
Starlin Castro led off the Cubs' second with a single, and two outs later, Barney hit his sixth homer.
"The big thing in the second inning was the inability to make some pitches. We had Castro 0-2, and he singled to start that rally. Then Barney hit the two-run homer, and the second home run from Soriano really put us in a hole," Astros manager Brad Mills said.
In the third, Rizzo singled home Josh Vitters to give Samardzija a three-run cushion.
After Rizzo singled in the fifth, Soriano hit his 21st home run.
Welington Castillo had an RBI infield single in the seventh, and Vitters drove in Barney with a sacrifice fly in the eighth.
Barnes, called up from the minors Aug. 7, homered in his fourth big league game.
Lucas Harrell, Tuesday's scheduled starter for Houston, will try for his 10th win of the season. He ranks first among National League rookies in innings pitched. ... Cubs starter Chris Volstad will try to win his first game since July 10, 2011, on Tuesday. He has not won in 22 starts. ... Astros C Jason Castro was back in the lineup after missing nearly a month with a right knee contusion. He was 1-for-4 and struck out three times.