The Lions (4-0) trailed by 27-3 in the third quarter but stormed back to tie a team record for biggest comeback ever, while the Cowboys established a team mark for biggest lead blown in a loss.
It marked the second straight week the Lions staged a big rally to win and gave them an eighth straight victory stretching back to last season.
The Lions posted a fourth straight win to start the season for the first time since 1980.
Detroit used three second-half interceptions of Tony Romo to key the comeback. Two of them -- by Bobby Carpenter and Chris Houston -- were returned for touchdowns while Stephen Tulloch's pick-off led to the winning score.
Stafford went 21-of-43 through the air for 240 yards with two TDs.
Romo, meanwhile, completed 34-of-47 passes for 331 yards and three scores but surrendered the three key interceptions.