NFL sacks leader Aldon Smith added two more to his total for 19 1/2, passing Fred Dean's franchise-best single-season mark of 17 1/2 set in 1983. Smith also moved within three sacks of Michael Strahan's seasonal NFL record set in 2001 with the New York Giants.
Michael Crabtree had nine catches for 93 yards and rookie LaMichael James ran for 30 yards in a solid NFL debut for the 49ers (9-3-1), who kept hold on the No. 2 seed in the NFC behind Atlanta.
Anthony Fasano made a diving 3-yard touchdown catch for Miami (5-8) midway through the fourth quarter on a perfect pass from Ryan Tannehill. Fasano's right knee landed in the end zone as he fell out of bounds under pressure from safety Donte Whitner.
Miami went for it on fourth-and-10 from the 35 with 4:16 remaining and Tannehill overthrew Marlon Moore on the left sideline.
The sold-out crowd at Candlestick Park was treated to a spectacular, clear Bay Area day. The football didn't quite live up to it until the Dolphins made things interesting late.
Harbaugh's NFC West-leading Niners hardly looked like a power for most of the afternoon against overmatched Miami who Harbaugh considered coaching before accepting a $25 million, five-year contract with San Francisco in January 2011.
The 49ers took advantage of a special teams blunder to end a five-quarter stretch without a touchdown. Marcus Thigpen fumbled trying to catch Andy Lee's punt early in the third quarter, and C.J. Spillman recovered on the Dolphins 9 to set up Gore's short TD burst.
Cameron Wake had three first-half sacks to highlight a lackluster day by the Dolphins. On offense, rookie quarterback Tannehill faced constant pressure.
Dan Carpenter kicked a 53-yard field goal in the third quarter for the Dolphins and also an earlier 28-yarder. Miami was held to 227 total yards.
San Francisco went on fourth-and-1 on the 38 late in the third quarter and Dolphins cornerback Sean Smith was called for pass interference against Crabtree. Dixon scored his second touchdown of the season five plays later.
Harbaugh stuck with Kaepernick a week after a 16-13 overtime loss at St. Louis, and the second-year pro delivered with an 18-for-23 day and 100.2 passer rating.
David Akers' 30-yard field goal in the second quarter tied the game at 3, then he kicked a 37-yarder as time expired before halftime. The 49ers led 6-3 at halftime.
San Francisco lost defensive lineman and special teams standout Demarcus Dobbs to a right knee injury in the first half. He was carted off the field. Dobbs returned to the field after missing the trip to St. Louis following his arrest on suspicion of driving under the influence and marijuana possession.
Online: http://pro32.ap.org/poll and http://twitter.com/APNFL
Miami 13, San Francisco 27
Miami 0 3 3 7 13
San Francisco 0 6 7 14 27
Mia • FG Carpenter 28, 13:31.
SF • FG Akers 30, 8:00.
SF • FG Akers 37, :00.
SF • Gore 1 run (Akers kick), 11:17.
Mia • FG Carpenter 53, 6:53.
SF • Dixon 1 run (Akers kick), 14:27.
Mia • Fasano 3 pass from Tannehill (Carpenter kick), 7:55.
SF • Kaepernick 50 run (Akers kick), 2:10.
Attendance • 69,732.
First downs 17 20
Total Net Yards 227 321
Rushes-yards 22-94 28-155
Passing 133 166
Punt Returns 2-10 1-12
Kickoff Returns 5-153 3-79
Interceptions Ret. 0-0 0-0
Comp-Att-Int 17-33-0 18-23-0
Sacked-Yards Lost 2-17 4-19
Punts 3-47.3 4-48.3
Fumbles-Lost 3-1 1-0
Penalties-yards 5-43 6-45
Time of Possession 29:28 30:32
Rushing • Miami, Bush 14-65, Tannehill 3-25, Thomas 2-3, L.Miller 3-1. San Francisco, Gore 12-63, Kaepernick 6-53, James 8-30, Dixon 2-9.
Passing • Miami, Tannehill 17-33-0-150. San Francisco, Kaepernick 18-23-0-185.
Receiving • Miami, Bess 5-50, Bush 5-38, Hartline 2-34, Fasano 2-9, Matthews 1-8, L.Miller 1-8, Clay 1-3. San Francisco, Crabtree 9-93, Moss 2-30, Gore 2-22, Miller 2-1, Walker 1-20, James 1-15, V.Davis 1-4.
Missed Field Goals • None.