The rookie free agent guard was signed by the team on Friday, GM Daryl Morey announced.
Gray gained attention after he helped lead the Coogs to their first NCAA tournament win since 1984.
After transferring from Howard College, Gray made a name for himself with the University of Houston, averaging 18.8 points, 3.3 rebounds, 3.7 assists and 1.2 steals. He finished his career as the American Athletic Conference's all-time leading scorer with 1,710 points.
Gray was eligible for the 2018 NBA Draft after his senior season at UH. He played with the Rockets during the NBA Summer League in Las Vegas.
The new addition will fit right into the Rockets' beautiful hair tradition.
Gray's man bun has been a topic of conversation, but as Gray told NCAA.com, the hairstyle has nothing to do with his play.
"I already got 6'6" defenders on me, I can't have hair all in my eyes. I need to be able to concentrate, so I just throw it back in a bun," he said.