Pistons vs Mavericks recap
Christian Wood's dunk tied the game at 125 with 1:35 left in overtime, but Hayes answered with back-to-back 3-pointers to put the Pistons ahead by six with 41.6 left and seal the win.
Bojan Bogdanovic led the Pistons with 30 points while Marvin Bagley III added 19 points and 13 rebounds.
Luka Doncic had 35 points and 10 assists for Dallas. Tim Hardaway Jr. scored 26 points.
Hayes' jumper gave the Pistons a 111-104 lead with 4:14 to play in regulation and Doncic missed a 3-pointer at the other end. Another Hayes jumper moved Detroit's run to 10-0 and the lead to 113-104.
After a Christian Wood dunk, Hayes hit his third straight jumper to keep Detroit up by nine.
The lead was still eight with two minutes left and five when Doncic missed a pair of free throws with 1:00 left - giving the Mavericks 15 misses on the game - but the Pistons didn't take the chance to ice the game.
Hardaway Jr. got the rebound and fed Doncic for a 3-pointer to make it 117-115. Alec Burks missed at the other end and ex-Piston Reggie Bullock's layup tied the game with 22.6 seconds left. Isaiah Stewart missed a 3-pointer and the clock ran out during the scramble for the layup.
Doncic had 20 points in the first half, and the Mavericks got to 60 points despite missing eight of 17 free-throw attempts in the half.
Mavericks: Dallas came into the game with a five-game winning streak against the Pistons, matching their longest streak in the series.
Pistons: Ivey had his 18th double-digit scoring game, putting him second among rookies to Indiana's Bennedict Mathurin.
Mavericks: Visit the New York Knicks on Saturday.
Pistons: Host the Memphis Grizzlies on Sunday.