Williams was automatically eligible for the 2010 NBA draft as he was already one year removed from his high school graduation. He was drafted by the Miami Heat in the second round with the 48th pick. He became the first player ever to skip college basketball and play a year in the D-League before getting drafted in the NBA. He also became the second player to be drafted from a D-League team to the NBA, after Mike Taylor in 2008. Shortly after being drafted by the Heat, his draft rights were traded to the Oklahoma City Thunder, the NBA team affiliated with the Tulsa 66ers, in exchange for a future second-round pick.