The dramatic moment overshadowed the meltdown of closer A.J. Ramos, who blew a rare save in the ninth for Miami. Ramos had converted 33 straight saves, one short of the franchise record, before Tyler Flowers led off with his sixth homer to force a 5-5 tie.
Fernandez, one of baseball's most dynamic starters, began the game with a .222 batting average in 27 at-bats. With the pitcher's spot due up in the 12th and no position players available, Fernandez batted for reliever Nick Wittgren (3-1) and delivered the big hit.
Fernandez is Miami's starter Saturday.
Casey Kelly (0-3), the sixth Atlanta pitcher, took the loss.