On the verge of defeat in the ninth inning, Stanton blasted a game-tying home run off Nationals closer Rafael Soriano.
The youthful Marlins continue to show signs of growing up, as they won their third straight and secured a series victory over the Nationals with one game remaining before the All-Star break.
Miami pulled off its 19th comeback win and improved to 4-6 in extra innings.
On a night the Marlins collected four hits, they pulled off their fifth walk-off without a hit. And the run was unearned.
With one out and the bases loaded in the 10th inning, Lucas tapped a ground ball to second off Nationals reliever Craig Stammen. The Nats were attempting an inning-ending double play, but Lucas was just safe at first base. A throwing error by third baseman Chad Tracy on Adeiny Hechavarria's grounder to open the inning made the run unearned.
"We feel like we can still win these games," Marlins manager Mike Redmond said. "You guys here in April, that's a double play in April, right? To win that thing on a fielder's choice ..."
The Marlins were 14-41 in April and May, but they are 21-16 since.
Fernandez, Miami's 20-year-old All-Star right-hander, admittedly wasn't his sharpest. But he still kept his team close, allowing one run on four hits with three walks and four strikeouts in six innings.
"I love this team. I'm going to give it my heart," said Fernandez, an emerging leader. "I'm going to give everything to it. Whoever doesn't like it, I don't mind. This is my team. This is what I work for every day."
It was a well-pitched game on both sides.
Dan Haren threw six shutout innings, limiting the Marlins to three hits while striking out seven.
The Marlins were on the verge of being shut out for the 10th time, and first since May 22 against the Phillies. But leading off the ninth inning, Stanton delivered an impressive blast to pull Miami even.
Stanton crushed Soriano's 1-2 offering an estimated 434 feet to left-center, setting up extra innings.
"I never think homer," Stanton said. "You may swing harder in some counts, so whatever, whatever. But I had two strikes, so that was more, 'Get the barrel on the ball.' It was still a ball, but I got my hands to it. That's thing. If the ball is up and you get your hands to it, it's going to go if you get on top of it."
It was Stanton's second home run in as many games, and 10th on the season.
Exuberant in the dugout, Fernandez was animated rejoicing with his teammates.
"I was pretty happy," Fernandez said. "I got so excited. I know it was worth it. I enjoy it. My teammates laugh. When he made contact too, he made a bomb. Their closer is one of the best in the league. It was fun. I like to have fun and this is a game."
In the Marlins' bullpen, Steve Cishek watched Stanton deliver, then he went about his business.
"Obviously, when Stanton is hitting, everything stops," Cishek said. "He's capable of doing incredible damage. I was just watching him, waiting for something big to happen. You leave one up to him late in a ballgame, he's going to make you pay. That was awesome."
The Nationals threatened off Cishek in the 10th inning, putting two runners on. A wild pitch by Cishek complicated the inning for the sidearm-throwing right-hander, moving those runners to second and third with one out.
But the closer struck out Scott Hairston and Ryan Zimmerman to keep the score knotted.
"I just wasn't making pitches," Cishek said. "I didn't throw a single slider where I wanted to up until I faced Zimmerman, for some reason."
The reason Hairston was batting was because Bryce Harper was ejected in the eighth inning. Washington shortstop Ian Desmond spoke out afterward about Harper not being on the field.
"I usually try to say the right thing, I guess," Desmond said. "We have to have our three-hole hitter in the game right there. It's as simple as that. The person that hits in the three-hole is usually your best hitter, one of your better players, usually the best. There is no doubt that his skill set is there, but ... in a one-run ballgame ... we need that game."
Harper was involved in several key moments, including scoring the Nationals' lone run on a collision at the plate in the fourth inning. He also disputed two strikeouts with home-plate umpire Hunter Wendlestedt.
In the sixth inning, the Nationals' All-Star outfielder was not pleased with a called third strike Fernandez received on a fastball on the outside corner. Harper exchanged a few words with Wendlestedt.
And in the eighth inning, after being called out looking against Dan Jennings, Harper was more vocal in his protest, and he was immediately ejected by Wendlestedt.
Fernandez was able to work out of potential trouble in each of the first three innings. But walks hurt the hard-throwing right-hander. He issued a free pass in three of the first four frames.
In the fourth, a leadoff walk to Harper ended up costing Fernandez. Harper moved to third on Adam LaRoche's one-out single to left field. Miami had the shift on for the left-handed-hitting LaRoche.
Jayson Werth brought Harper home on a sacrifice fly to center on a 2-2 pitch. Harper lowered his shoulder and barreled over catcher Jeff Mathis, who was unable to hold on to Marcell Ozuna's throw to the plate. Harper and Mathis were both fine.
"The most important part, I think about today is, I think the fans, everybody who knows baseball and loves baseball, sees that we fight," Fernandez said. "We never give up. Even when we're losing and we're facing one of the best closers in the game, we never give up. I love this game so much. It gives you the chance every day to come here and compete. For me, it's a blessing. I'm going to play hard every time."