The teams announced the deal after it became official Friday.
Diaw is one of three veterans the Jazz brought in to bolster their roster for a playoff push next season after narrowly missing the postseason in 2016. The Jazz haven't been in the playoffs since 2012.
Diaw gives the Jazz a versatile 6-foot-8, 250-pound power forward who can play center in smaller lineups. The 13-year veteran averaged 6.4 points, 3.1 rebounds and 2.3 assists last season while shooting 36.2 percent from 3-point range.
His passing ability is expected to fit well in the Jazz's scheme and general manager Dennis Lindsey said he instantly became one of the better passers on the team. Diaw is currently playing with the French national team and is good friends with Jazz center and fellow Frenchman Rudy Gobert.
Lindsey was in the San Antonio front office when they brought Diaw in from Charlotte during the 2011-12 season. Diaw was a key member of the Spurs' 2014 championship team.
"We felt like his passing, his unique style, situationally could provide us with a much different look," Lindsey said. "We were pleased adding someone who's tough, physical, can really pass the ball, who's improved his distance shooting as well."
Lindsey went into the offseason looking to add experienced depth, shooting, passing, physicality and players with a serious mindset. Roles have yet to be defined, but there is increased competition throughout the roster.
Hanlan was a second-round pick by the Jazz in 2015 and he played last season with Zalgiris Kaunas in Lithuania. The 6-4, 186-pound point guard from Boston College was the No. 42 overall pick.
The Jazz had a logjam at point guard, even before trading for Hill. They added another point guard, Marcus Paige, in the draft before moving Hanlan and trading away Trey Burke to the Washington Wizards for a 2021 second-round pick.
The Jazz will also receive cash considerations in the Hanlan deal.