The Charlotte Hornets received the ninth pick in June's NBA draft from the Detroit Pistons at Tuesday's draft lottery.
Charlotte also has the 24th pick from the Portland Trail Blazers, completing the Gerald Wallace trade.
The Pistons, whose pick was protected if it was in the draft's top 8, owed the Hornets the pick to finalize the 2012 Ben Gordon-Corey Maggette trade.
The Hornets lost their own pick (16th overall) to the Chicago Bulls, completing the Tyrus Thomas trade.
The night's big winners were the Cleveland Cavaliers, who continued their remarkable lottery luck by winning the No. 1 pick in the NBA draft for the second straight year.
It's the third time in four years the Cavs will be atop the draft after moving up from the ninth spot. They had just a 1.7 percent chance of winning the top spot Tuesday night.
They drafted Kyrie Irving first in 2011 and will hope to do better with this win than last year, when they took Anthony Bennett, who had a forgettable rookie season.
The Milwaukee Bucks fell one spot to second and the Philadelphia 76ers will draft third.