Hayes arrived at Kentucky in 2001 after being named Mr. Basketball in the state of California his senior year of high school. Hayes was named to the All-SEC Freshman Team in 2002, and during the next three years, along with future NBA players Keith Bogans, Gerald Fitch, Erik Daniels, and Kelenna Azubuike helped to contribute to a resurgence in Kentucky basketball. Over Hayes' sophomore, junior and senior seasons, Kentucky accumulated a record of 87-15 (.853), and earned final AP rankings of 1st, 2nd and 7th respectively. During Hayes' senior season, the Kentucky athletics department promoted him as an All-American candidate, using the slogan "All He Does Is Win". Hayes did not earn All-America honors.
Hayes was not selected in the 2005 NBA Draft, but was signed by the Houston Rockets prior to the 2005-06 season. Hayes played in several preseason games before being cut. Hayes was then selected sixth in the 2005 NBA Development League Draft by the Albuquerque Thunderbirds. . Due to a rash of injuries on the Houston roster, Hayes was signed to a 10-day contract on January 18, 2006. In his second game in a Rockets uniform, Hayes posted a double-double, collecting 12 points and 13 rebounds in a 109-108 win over the Chicago Bulls on January 20. On January 28, the Rockets announced they were signing Hayes for the rest of the season.