Hamilton hit a pair of home runs, two singles and a triple while driving in five runs. With a chance for the cycle in the eighth, Hamilton walked.
"Pretty impressive," said Astros slugger Lance Berkman, who extended his hitting streak to 15 consecutive games. "That guy is hitting some pitches I probably wouldn't even swing at and if I did, I'd be out -- and he's hitting them off the second deck for three-run homers and stuff. Tremendous bat speed, great looking athlete. We saw some of that last year when he was with Cincinnati, so no surprise."
Berkman, Kazuo Matsui, Carlos Lee and Darin Erstad had two hits apiece for the Astros, who lost for just the third time in 15 games.
After the Astros came from six runs down to tie the game, the Rangers broke open the 8-8 deadlock with a pair of runs in the seventh.
Michael Young's single to right off Wesley Wright (3-1) scored Ian Kinsler with the go-ahead run, though Astros right fielder Hunter Pence's throw to the plate nearly nabbed Young in a close play that led to Cooper getting ejected by umpire crew chief Angel Hernandez.
"I thought the throw was right there to beat him, and I thought he was out," Cooper said. "[I] didn't curse. I just told him I thought they missed it. He said, 'You want to get out of here?' I said, 'You've got to do something, because I'm not leaving.' I'm assuming that's why he threw me."
Hamilton followed with a triple to score Young.
"Hamilton hit a good pitch," Wright said. "He did what he's supposed to do."
Trailing 8-2 entering the fifth, the Astros hung a five on the board as they batted around against Rangers starter Sidney Ponson.
J.R. Towles, Pence, Miguel Tejada, Lee and Erstad each drove in runs during the rally, and Erstad missed a second RBI when Lee was gunned down at the plate as the potential tying run.
The Astros would get that tying run an inning later when Matsui lined a Frank Francisco pitch into center field to score Michael Bourn with two outs. Matsui fouled off a pair of 3-2 pitches before delivering the hit that would give Houston starter Shawn Chacon another no-decision.
"I thought we had a really good chance to win the game when we got it back to 8-8," Berkman said. "But at the same time ... [with] their offense, we've got our work cut out for us to [stop] them from coming up big, but unfortunately, that's what happened."
Pence's fine running catch of Chris Shelton's drive to the right-field wall with the bases loaded and two outs in the sixth saved at least two runs, and probably three.
"I thought that was the one that was going to get us over the hump, I really did," Cooper said. "He made a great play, I was jumping up and down and screaming as if he hit a three-run homer. I went down to hug him and shake him and I know he was excited -- we were all excited -- and I thought right there we were going to win it."
Chacon, 0-0, lasted just 3 1/3 innings -- his shortest start of the year -- after giving up eight runs (five earned) on six hits and four walks. The right-hander's nine consecutive no-decisions to begin the season is a Major League record for a starting pitcher.
Major League RBI leader Hamilton -- with 49 -- put Chacon in the hole with a pair of home runs that traveled a combined 866 feet.
"I knew I didn't have good stuff today," Chacon said. "I felt great, better velocity than I've had all year. Other than that, I didn't have a good sinker, I didn't have a good breaking ball, and my command of my fastball wasn't good. You add all that up and that wasn't good. They put the barrel on the ball a lot tonight, and you can see that in the score."