Anthony traveled to Houston and finished his physical Monday before signing the contract.
Rockets general manager Daryl Morey welcomed Anthony to the team in a tweet.
Anthony, 34, also received the remaining $25.4 million of his original 2018-19 salary from the Atlanta Hawks -- including a $2.4 million contract buyout.
Anthony will have a chance to compete for a starting spot in training camp, but could ultimately come off the bench based on what Rockets coach Mike D'Antoni decides is best for the team.
Anthony waived his no-trade clause to allow Oklahoma City to move him to Atlanta in a three-way deal with Philadelphia in July. Anthony has been working out with Rockets stars Chris Paul and James Harden.
Anthony met with Morey and D'Antoni in Las Vegas during summer league. The Thunder granted them permission to do so once the sides decided that a parting was imminent. Anthony had also met with the Miami Heat and considered signing there.
A 10-time All-Star forward, Anthony averaged 16.2 points for the Thunder a year ago. His career average is 24.1 points per game.