Sources told TNT analyst David Aldridge that Casey was not inclined to take the job at first, but pressure from the Pistons' front office this weekend got the deal done.
Casey, 61, was named Coach of the Year by his coaching peers before being fired on May 11. He went 320-238 in seven seasons with the Raptors, after being hired in 2011. Casey served as head coach for the Minnesota Timberwolves in 2005 and 2006, but never made the playoffs during that tenure.
The Raptors won a franchise-record 59 games during the 2017-2018 season and were the No. 1 seed in the Eastern Conference.
Detroit fired Van Gundy on May 7 after he went 152-176 in four seasons. Van Gundy led the squad to a 39-43 finish this season.
The Pistons haven't advanced to the Eastern Conference finals since the 2007-2008 season.