The high-scoring Saints trailed 24-3 going into the fourth quarter, then scored two quick touchdowns. After Dallas kicker Nick Folk watched his 24-yard field-goal try clang off the right upright shortly before the two-minute warning, Brees got a final chance to tie it.
Brees moved the Saints into Dallas territory, but on second down, DeMarcus Ware sacked him and forced a fumble that was recovered by the Cowboys with six seconds left.
Cowboys quarterback Tony Romo passed for 312 yards, including a 49-yarder to Miles Austin for a touchdown. Ware returned from a neck injury that left his status in doubt and was part of a relentless Dallas pass rush that pressured Brees all night.
Marion Barber had two short touchdown runs for the Cowboys (9-5), who ended a two-game skid and proved they were good enough to beat the top team in the NFC in front of a charged-up, hostile crowd.
The Cowboys' troubles in December had been well documented, but this win provided a dramatic boost to their playoff chances.
When Brees hit Lance Moore for a 7-yard score, it gave him 121 scoring passes since he joined New Orleans as a free agent in 2006, a record for a Saints quarterback. The pass pulled the Saints within 24-17 with eight minutes left in the game.
The previous record was held by Aaron Brooks, who threw 120 touchdown passes from 2000-2005.
Brees has 33 touchdown passes this season.