New England put itself in position to tie the game with a 9-yard touchdown pass from Cassel to tight end Benjamin Watson after a ridiculous roughing-the-passer penalty on Jason Taylor had negated a Reggie Howard interception.
New England's last drive followed Olindo Mare's fourth field goal of the game, a 42-yarder that gave the Dolphins a 28-20 lead.
Having already clinched the AFC East, the Patriots played with backups for most of the way. Tom Brady, for example, left the game after his touchdown pass to Deion Branch had tied the game at 7-7 in the first quarter.
Cassel went the rest of the way at quarterback for New England, although 43-year-old Doug Flutie came on for one play, and an unusual one at that.
After Cassel's TD pass to Tim Dwight had cut into Miami's 25-13 lead, Flutie took a snap and then executed a drop-kick, the first successful drop-kick in the NFL since 1941.
The Dolphins, meanwhile, had great balance on offense, with Ricky Williams rushing for over 100 yards for the second consecutive week.
Williams ran for a 2-yard touchdown in the first quarter and should have had another 16-yard score in the second quarter, but it was negated by another bad call by the officials, this one a holding penalty on Jeno James.
That came after the Dolphins had scored a safety when Reggie Howard sacked Cassel in the end zone, knocking the ball out of the end zone in the process.
The Dolphins totally dominated the statistics, but couldn't put away the Patriots because they didn't have much success in the red zone.
But they still managed to complete their tremendous run at the end of the season. It was Miami's best streak to end a season since 1985 and it gave a five-game improvement over last year's 4-12 mark.