Buffalo raced to a 17-point lead in the second quarter before the Dolphins responded with 17 unanswered points of their own, though the Bills would then hit 14 points to put them back in the drivers' seat.
Miami were not done though, fighting back to within a field goal, but an inexperienced offense could not capitalise, struggling to get plays off before the play clock ran down, as the Bills held on for a 34-31 victory.
First quarter touchdowns for Dawson Knox and James Cook came either side of an interception from Skylar Thompson, with Miami having just 19 yards and a solitary first down in a slow start to the game.
The Bills extended their lead with a field goal before Miami sprung into life with two field goals of their own and two interceptions on Josh Allen in the second quarter – who had just one in 228 playoff passing attempts in the playoffs before the game – as Mike Gesicki then tied the game with a seven-yard reception.
While the hosts retook the lead with a field goal before the break, the Dolphins moved ahead 24-20 early in the third quarter when an Allen fumble was recovered by Zach Sieler for a five-yard TD, putting the momentum back in the hands of the visitors.
The Dolphins could not capitalise though as Thompson, leading the offense in the absence of Tua Tagovailoa, threw five consecutive incomplete passes before being intercepted by Kaiir Elam. The Bills turned that into a Cole Beasley TD, then extended the lead with Gabe Davis' 21-yard score.
Miami pulled within a field goal through Jeff Wilson's reception and then had a huge stop on the Buffalo offense, but could not find their rhythm, receiving a delay of game penalty on a crucial fourth and one that leaves them still without a playoff victory since 2000.