The Jazz will send the rights to last year's second-round pick Olivier Hanlan to the Spurs. Hanlan played this past season overseas.
The trade gives San Antonio enough cap space to sign Gasol, who agreed to a two-year, $30-million deal with the Spurs on Sunday.
"Spurs' fans, thanks for all your messages. Great years here and a ring! Leaving but San Antonio will always be a special place to me," Diaw tweeted Tuesday afternoon. "Hey [Utah Jazz] and [Rudy Gobert]! I'm looking forward seeing you!"
The 13-year veteran averaged 6.4 points, 3.1 rebounds and 2.3 assists per game last season with the Spurs.
Diaw, 34, will make $7 million this season. Utah will hold a team option for Diaw in 2017-18.