Datsyuk got control of the puck in the left circle as the clock ticked down. After making a move on an Anaheim defender, he fired a wrist shot past Curtis McElhinney and into the net for the Red Wings' third straight win.
Detroit netminder Jimmy Howard made 21 saves.
The Ducks got a goal and an assist from Bobby Ryan while Ryan Carter, Danny Syvret and Teemu Selanne also found the net.
Anaheim received 36 saves from McElhinney in the loss.
Notable deaths of 2014 [PHOTOS]