The Flyers trailed 5-1 after the first period, but took a 6-5 lead with 5:07 left in the third period before Dylan Larkin tied it 37 seconds later.
Larkin had a goal and an assist, and Alex DeBrincat had three assists for Detroit (16-13-4), which has lost four straight. James Reimer made 37 saves.
Scott Laughton had one goal and one assist and Carter Hart made 31 saves for Philadelphia (18-11-4). Joel Farabee, Travis Sanheim and Egor Zamula each had two assists.
The Red Wings took a 1-0 lead at the 4:30 mark when Kane shoved in the rebound after Larkin’s shot hit the post. This play marked DeBrincat’s 200th career assist in the NHL.
Cain knocked a loose puck in off the edge of the crease to make it 2-0 at 8:16, but Bobby Brink made a 2-on-1 at 9:00 to get the Flyers within 2-1.
Daniel Sprong gave the Red Wings a 3-1 lead with a power-play goal off a pass from Moritz Seider at 14:55, and JT Compher made it 4-0 at 15:38.
Shayne Gostisbehere capitalized on another rebound to give the Red Wings a 5-1 lead at 19:42.
At 3:37 of the second period, Sean Couturier deflected a Sanheim shot to cut it to 5-2, and 24 seconds later Morgan Frost scored the same to pull the Flyers within 5-3. Ta.
At 5:51 of the third period, Garnet Hathaway tipped in Lawton’s shot to make it 5-4, and Lawton scored the rebound to tie the score at 5-5 at 13:30.
The Flyers led 6-5 at 14:53. Reimer stopped Owen Tippett’s first shot, but the shot traveled down his legs and Tippett stuck the puck in behind him.
At 15:30, Larkin made it 6-6 from a sharp angle.
Hart stopped Gostisbehere from close range with 10 seconds left in overtime.
Red Wings defenseman Olli Maata left the game in the first period with an upper-body injury.