McDyess, who despite being 34 was among the most sought players on the market this summer, reached a deal with the Spurs and is expected to sign later this week, team spokesman Cliff Puchalski said.
The deal is for three years, $15 million, sources told ESPN's Chad Ford and Ric Bucher.
McDyess spent the last five seasons with Detroit, which also officially lost Rasheed Wallace on Wednesday when the veteran signed with Boston.
The Spurs reportedly sought Wallace, too, but got what they were looking for in McDyess: a big and proven frontcourt presence alongside Tim Duncan. The Spurs have won four NBA championships in the Duncan era, but their star centerpiece will be 33 come next year's playoffs.
With their window for a fifth title shrinking, the Spurs began a busy offseason in June by trading for Milwaukee swingman Richard Jefferson in a four-player deal that pushed San Antonio into the luxury tax.
Between Jefferson and McDyess, the Spurs have added two former Olympians to their lineup after being ousted in the first round of the playoffs last season for the first time since 2000. Following that series, the Spurs candidly admitted to not packing the same firepower as Dallas.
McDyess averaged 9.6 points and 9.8 rebounds in his 14th NBA season. His rebounding average last season was the third highest of his career.
The second overall pick in the 1995 draft, McDyess spent six seasons in Denver and also had stops in Phoenix and New York. He has never won an NBA title, going to Detroit the year after the Pistons won their last in 2004.
San Antonio also added a lesser-known big man Wednesday in Marcus Haislip, the former first-round pick who spent the past two years in Spain after fizzling in his first three NBA seasons. The 6-10 forward was picked 13th overall by Milwaukee in 2002 before going to Europe to work on his game.
The Spurs also brought back forward Malik Hairston, who played 15 games with the Spurs last season and spent much of the year in the NBA development league.
San Antonio needed size after dealing backups Fabricio Oberto and Kurt Thomas in the Jefferson trade. The deal amounted to a salary dump for the Bucks, who wanted to shed the $29.2 million owed Jefferson over the next two seasons.
Information from The Associated Pres was used in this report.