Miami racked up season highs for runs and hits (22). The runs total was the most since the Marlins scored 16 against the Nationals on Sept. 1, 2010.
"That's how baseball works sometimes," said Realmuto, the organization's Minor League Player of the Year. "We've been struggling scoring runs for the better half of this month right now. Sometimes it all comes out in one game. It was nice to see that out of our lineup. We got on a roll early, and once you get going like that, you kind of start to feed off each other, which was nice."
Andrew Heaney, the team's top prospect, was unable to qualify for his first big league win, working four innings and allowing four runs. The 23-year-old made his first big league start since July 5, and he finished up his season with 29 1/3 innings after opening the year at Double-A Jacksonville and moving up to Triple-A New Orleans.
"I felt good," said Heaney, who also recorded his first Major League hit on an infield single. "I just threw some fastballs up in the zone that got hit hard. I wasn't very good throwing secondary stuff. Once the fourth inning rolled around, I was able to get in the zone a little easier and able to mix pitches. Before that, it was just kind of flat and up."
In the ninth inning, Hernandez broke the game open with his grand slam. Miami scored five times off Craig Stammen in the inning, its second five-run frame of the game.
The big offensive showing comes at a time when All-Star Giancarlo Stanton (facial fractures) and Marcell Ozuna (right ankle sprain) are out of the lineup.
Their absence is creating opportunities for young players like Realmuto and Justin Bour, who had a two-run double in the seventh.
"Obviously, I want everybody to hit the ball well, but it's exciting for me to see J.T., Bour and guys I got to play with at the Minor League level succeed," Heaney said. "That's always fun."
The Marlins are now 77-83, which ties them with the Mets and Braves for second place in the National League East.
"It's actually pretty exciting to think about where we were last year to this year," Miami manager Mike Redmond said. "No. 1, to be able to talk about a Wild Card spot as long as we were able to do it late into September. Now, to be playing for second place from last year to this year, that's a testament to those guys in the room over there. They've given me everything they have."
A year ago, Miami finished 62-100, the worst record in the NL.
A.J. Ramos, who threw a perfect eighth inning, was awarded the victory. Ramos is now 7-0. The last time an NL reliever finished the season 7-0 or better was Rheal Cormier (8-0) in 2003.
The Nationals, who clinched home-field advantage through the NL Championship Series with their Game 1 win, received a couple of home runs. Steven Souza Jr. went deep off Heaney in the third inning, and in the seventh inning, Tyler Moore connected off Chris Hatcher.
The Marlins grabbed the lead in a five-run fifth, doing all their damage with two outs and no one on against Washington right-hander Taylor Hill, making his first big league start. Reed Johnson had an RBI double, and after Bour was intentionally walked to load the bases, Realmuto ripped a three-run triple down the third-base line.
Realmuto's first MLB triple ended Hill's day after 4 2/3 innings and 90 pitches. Ross Detwiler entered to face Adeiny Hechavarria, who capped a 12-pitch at-bat with an RBI double, giving Miami a 7-4 lead. Hechavarria finished with four hits.
In 1 2/3 innings of relief, Miami's Brad Penny gave up two runs, making it a one-run game.
When Miami scored in the first on Casey McGehee's single, it snapped Washington's string of 18 straight scoreless innings.
"I wasn't sharp like I wanted to be," Hill said. "That's part of it. I found myself behind a lot of hitters. It ended up hurting me toward the end of the game."