Pistons center Cheick Samb also will go to Denver to make the salaries match in the trade.
Billups helped guide the Pistons to the Eastern Conference finals during each of his previous six seasons in Detroit. He grew up in Denver and played 58 games for the Nuggets over two seasons from 1998-2000.
McDyess has had two previous stints with the Nuggets, and he began his career with them in 1995.
Iverson was traded to Denver in December 2006 but was not able to help Carmelo Anthony lift the Nuggets out of the first round of the playoffs in his two seasons there.
The trade gives the Pistons salary-cap flexibility at the end of the season. Iverson's contract, which pays him $21.9 million this season, expires in July.
Billups is owed $36.3 million over the next three seasons and has an additional $14.2 million team option for 2011-12. McDyess will make $6.8 million each of the next two seasons.