The Padres were baffled by Fernandez (5-4), getting just two hits and a walk off him. The dominating right-hander retired 13-of-14 San Diego batters at one point, fanning seven during the span.
The 20-year-old rookie threw 100 pitches while lowering his ERA to 2.72 as the Marlins won a third straight in their four-game set against San Diego.
Steve Cishek was called on to get the final out for his 15th save in the ninth after A.J. Ramos had allowed two baserunners.
Jeff Mathis belted a bases-clearing double in the sixth inning to provide Miami a four-run lead -- all of them unearned after shortstop Pedro Ciriaco's error.
San Diego's Jason Marquis (9-4) took took the loss after walking seven over 6 1/3 innings, yielding four runs (none earned) on five hits.
2014: The Year in Music [PHOTOS]