Williams, a nine-year NBA veteran, averaged 9.1 points, 5.1 rebounds and 1.2 assists last season for the Utah Jazz.
The Jazz did not try to resign Williams, and his eventual exit became clear after the Jazz traded for forward Steve Novak earlier this week.
He was the second Jazz forward the Hornets attempted to bring in this offseason, as Utah elected to match Charlotte's four-year, $63 million offer sheet to restricted free agent Gordon Hayward earlier Saturday.
The Hornets view Williams as a potential replacement for power forward Josh McRoberts, who previously agreed to a contract with Miami. Williams is also versatile enough to play small forward.
Williams' addition should be popular among area Tar Heel fans.
Williams played college basketball at North Carolina, the same school as Hornets owner Michael Jordan, and helped the Tar Heels to a national championship as a freshman in 2005. He was the second overall pick in the 2005 NBA draft.