Moehler, who was making his eighth start of the season after taking Bud Norris' spot in the rotation, held the Pirates to three hits, one walk and had struck out three batters. He threw 52 pitches in his shortest start since lasting only 2 2/3 innings on May 29 at Cincinnati.
Moehler first appeared to have trouble with the groin after throwing his 35th pitch of the game, which came with one out in the third inning with Andrew McCutchen at the plate. Manager Brad Mills and head athletic trainer Nate Lucero came to the mound, and Moehler stayed in the game after throwing warm-up pitches.
The veteran right-hander, who was 1-4 with a 5.20 ERA entering the game, was 1-2 with a 3.86 ERA in his previous six starts. The Astros were 4-2 in those games.