Hamilton has averaged 6.8 points and 3.4 rebounds in 39 games for the Nuggets this season. Hamilton, who went to the University of Texas, has started 11 games this season.
Brooks, a reserve point guard, was in his second stint with the Rockets. He was averaging 7 points in 43 games this season for Houston.
The deal will be complete once both players pass physicals.