Behind a pair of home runs from designated hitter Chris Carter and the first win by starting pitcher Brad Peacock in more than a month, the Astros tied a franchise record with their fourth consecutive win over the Rangers and took their first series in Arlington since 2006.
The Astros, who were 2-17 against the Rangers in their first season in the same division last year, are only one game behind their in-state rivals in the American League West standings.
"It's nice to beat them this year after last year they beat up on us pretty good," Carter said. "We're having success this year against them and I'm happy about that."
The Astros arrived in Arlington on Monday on a season-high seven-game losing streak but have scored 20 runs and bashed 29 hits in the first two games of the series, which concludes Wednesday when each team throws its ace -- lefty Dallas Keuchel for the Astros and Houston nemesis Yu Darvish for the Rangers.
"I'm very pleased because we came in scuffling offensively, and the way we swung the bats the last two days is very encouraging," Astros manager Bo Porter said.
Carter led off the sixth and eighth innings with homers for his third multi-homer game of the season. George Springer led off the third with his 18th homer of the season, which is one ahead of Carter for the club lead.
"Again, this guy hits them in bunches," Porter said of Carter. "Let's hope that this here is one of those bunches that we can ride it out because he can carry a team when he's right. You look at the home run to left field, you're talking about getting extension. He's a big, strong man, and he's swinging the bat well right now."
Carter was asked about his penchant for hitting two homers in a game this year.
"What about three?" he joked.
The Rangers weren't laughing after suffering their 17th loss in their last 20 games.
"We're fighting, we're playing," right-fielder Alex Rios said. "We're coming here to play every day, every night and we're going to keep doing it with what we have. There's no other way to see it and we're optimistic to come every day and play."
A night after every player in their starting lineup had at least one hit, the Astros nearly duplicated the feat Tuesday, with only Robbie Grossman (0-for-4) coming up empty in his return to the lineup from Triple-A Oklahoma City.
"You feed off of each other and we got away from some things the last few games and now are starting to slow everything down and go out and play," Springer said.
Peacock (3-5) won for the first time since June 5 by holding the Rangers to two runs and six hits in 5 2/3 innings. He didn't walk a batter for only the second time in 13 starts this year. The Astros have won five of his last eight starts.
"Peacock did a good job attacking the strike zone," Porter said. "I felt like with the heat here, it's tough when you come in here and you're not used to pitching in this element. I feel like you have to watch the guys close as far as their stuff leaving them."
Astros All-Star second baseman Jose Altuve went 2-for-3 and stole his 40th base to join Kenny Lofton as only the second players since 1933 to amass 125 hits and 40 steals before the All-Star break. He's swiped 28 consecutive bases without being caught, tying Carlos Beltran's club record set in 2004.
"We came into here and we were [reeling] and had lost seven in a row, and it was more about getting our team back on track, and I felt our guys have definitely done that," Porter said.