Fernandez (9-5) gave up two runs in all on four hits, overcoming three walks while striking out eight. His effort extended his personal unbeaten streak to seven consecutive starts.
A.J. Ramos and Chad Qualls each pitched an inning of scoreless relief for the Marlins, who took the first of a four-game series.
Logan Morrison's run-scoring double in the sixth inning put Miami ahead to stay at 3-2, while Christian Yelich, Donovan Solano, Giancarlo Stanton and Adeiny Hechavarria each added an RBI.
Hyun-Jin Ryu (12-4) experienced his first loss since June 19 -- a span of 10 starts -- yielding three runs on six hits in a 7 1/3-inning outing.
Juan Uribe went 3-for-4 with an RBI for the Dodgers, who lost consecutive games for the first time since June 20-21.
Mathematician offers formula for finding the perfect Christmas tree
Blake Lively's Christmas wish would bankrupt Ryan Reynolds