© Getty Images
The home side's opening touchdown came from LeSean McCoy from the resulting punt as the back found a hole in the line to race into the endzone from 48 yards.
Lamar Miller brought the Dolphins back into the game when he finished a solid drive from his side's offense by plowing into the endzone on the goalline.
© Getty Images
However, Dan Carpenter notched a 43-yard field goal and Karlos Williams found the endzone by racing down the left sideline, beating several tackles to cross the goalline for a 29-yard score to restore the Bills' advantage.
Miami had the chance to get three points back before the break, but with two seconds remaining in the half Dan Campbell's men went for the touchdown, which saw cornerback Stephon Gilmore break up the pass to Jarvis Landry.
In the second half, the Dolphins found their rhythm on offense again and Tannehill completed a series of short throws before Miller pounded the ball into the endzone for his second score of the match.
Bills quarterback Tyrod Taylor produced a moment of magic to turn the game in his side's favour as he escaped the Dolphins' pass-rush and launched the ball deep for Sammy Watkins to catch in the endzone from 44 yards.
The home side confirmed their win when Williams burst away through a hole in the line and bounded past three defenders to canter into the endzone from 38 yards.
Andrew Franks added a late field goal for the Dolphins, but they fell to their second defeat on the spin.