Pablo Sandoval and Hector Sanchez drove in three runs each in a 19-hit bombardment that gave the Giants their second straight win.
The 14 runs were the most for San Francisco this season. The Giants had scored 10 runs in a game on seven occasions in 2013.
With the bases loaded in the first, Pence hit a grounder that was bobbled for an error by shortstop Adeiny Hechavarria. Two runs scored on the play, but only one of them was eventually judged to be unearned.
Pence then doubled home two runs in the second, had a run-scoring double in the fourth and brought in another run in the seventh with a triple.
Sanchez hit a three-run homer during a five-run fourth that gave the Giants a 12-5 lead.
Sandy Rosario (3-0) picked up the win as the third of five San Francisco pitchers. He worked two innings without giving up a run.
The Giants got to Nate Eovaldi (2-3) for nine earned runs on 12 hits in just three innings.
Miami had 16 hits with Justin Ruggiano driving in four runs, two of them with homers.
Celebrity Breakups and divorces of 2014 [PHOTOS]