The Cowboys (8-8), with Kyle Orton filling in two days after Romo had back surgery, lost to a division rival with a playoff berth on the line for the third straight year.
The Eagles (10-6) will host New Orleans in a wild-card game Saturday night.
Dallas trailed 24-16 when Orton threw a 32-yard touchdown pass to Dez Bryant. Orton went back to Bryant for the 2-point conversion, but Cary Williams dove to punch the ball away.
The Cowboys got another chance with a stop from the league's worst defense, but Orton's pass was intercepted by Brandon Boykin on the first play to seal the win.
"We kept fighting. We believed in each other," said Foles, who was 17-for-26 for 263 yards after throwing for only 80 in a 17-3 loss to Dallas at home. "When the offense was struggling, the defense picked us up."
The Cowboys were down 10-0 early in the second quarter and never led, but still found a way to make it interesting without Romo and defensive leader Sean Lee, who was out with a sprained neck.
Regardless, Dallas has finished 8-8 in all three of coach Jason Garrett's full seasons, and is 136-136 since the start of 1997. The Cowboys are only the third team in NFL history to have three straight 8-8 records.
"You feel a tremendous sense of pride about how the team played, how they fought, how they scratched, how they clawed, how they battled," Garrett said. "But having said that, we didn't get the job done."