Huff hit a sacrifice fly in the second inning and belted a solo homer in the fourth. Berkman hit a two-run homer in the seventh.
Mike Lamb hit an RBI single; Luke Scott hit a two-run triple; Berkman and Craig Biggio scored twice; and Willy Taveras had a run and two hits to extend his hitting streak to 20 games for the Astros (58-63), who broke a five-game losing streak.
Winner Jason Hirsh (1-1) allowed three runs and three hits in 5 1/3 innings with four walks and five strikeouts.
Milwaukee has split its last four games.
Loser Ben Sheets (3-5) gave up 10 hits and seven runs in seven innings.