Jed Lowrie had three hits and drove in a run for the A's, who have the best record (63-38) in baseball and are a season-best 25 games over .500.
Chris Carter hit a home run for the Astros, who fell to 2-4 since the All-Star Break.
Samardzija (2-1) gave up a leadoff single to Jose Altuve and then retired 10 straight before Carter's 20th home run put Houston on the board. He did not walk a batter and struck out six.
He retired 12 of 13 following Carter's blast. Carter was the lone Astro to venture past second base against Samardzija.
Samardzija was 2-7 with the Cubs despite a 2.83 ERA. He entered with the third lowest run support in the majors at 3.05 runs per outing.
Scott Feldman (4-8) lost his straight start, lasting 5 1-3 innings. He allowed six runs on nine hits, walking five and striking out four.
Feldman allowed at least six runs for just the third time this season but for the second time in three starts. He's allowed 16 runs on 27 hits over his last 17 2-3 innings.
The A's were already ahead 4-1 entering the sixth when Moss delivered his third grand slam of the year.
Feldman walked Eric Sogard and gave up a single to Coco Crisp before striking out John Jaso. Anthony Bass replaced Feldman and hit Josh Donaldson to load the bases ahead of Moss. Lowrie also drove in a run in the inning.
Stephen Vogt added a three-run double in the eighth. Josh Reddick, who had a pair of doubles, added a sacrifice fly.
Donaldson and Derek Norris, who had three hits, each drove in runs in the third. Sogard scored on a wild pitch. Crisp's sacrifice fly in the fourth put the A's ahead, 4-1.
NOTES: RHP Jim Johnson was designated for assignment before the game, ending a short, tumultuous relationship with the A's fans, whom have booed him since opening day. . A's OF Yoenis Cespedes (sprained right thumb) could return to the starting lineup on Friday. . A's INF Alberto Callaspo (right hamstring strain) is scheduled to begin a rehab assignment on Saturday. . RHP Jason Hammel (0-2, 9.00) is scheduled to make his third start for the A's against the Rangers in Texas on Friday. . LHP Dallas Keuchel (9-6, 3.29) starts for the Astros at home against the Miami Marlins, which begins a 10-day, 10-game homestand, the longest of the season. . Carter has an extra-base hit in each of his past four games, a season-best. . Altuve went was 2 for 4 against Samardzija after entering the game 1 for 11 against him. . Samardzija improved to 21-3 lifetime when receiving at least three runs of support. ... The A's surpassed 500 runs on the year.