After an RBI single by Miguel Rojas and fielder's-choice groundout by Bryan De La Cruz tied the score, Sanchez hit the first pitch he saw from Kyle Finnegan (5-7) to left-center for his 12th homer of the season.
“The first thing that came to mind was (hitting coach Eric) Duncan letting me know that this pitcher throws at least 90% fastballs,” Sanchez said through an interpreter.
“That's been the pitch I've been successful with so I decided I'm going to sit on this one. Normally I've been having good contact with fastballs. I knew I was going to be successful and the home run came along.”
Sanchez also hit a two-run homer in the sixth for Miami's first runs. The 23-year-old rookie has five home runs and 10 RBI in his past six games.
De La Cruz homered in the eighth for the Marlins, who took two of three from Washington.
“It wasn't a great day until the last inning, and obviously we turned it into a pretty good day and those are the types of games you've got to win," Marlins manager Don Mattingly said.
Miami improved to 2-66 when trailing after eight innings.
Washington had broken a 3-3 tie with two runs in the seventh.
In a matchup of rookie left-handers with the same last name, the Nationals’ Josh Rogers left with a 2-0 lead after surrendering one hit and one walk over five innings. He struck out six while throwing 73 pitches.
Marlins starter Trevor Rogers allowed multiple baserunners in each of his four innings. He gave up one run on seven hits, walked one and struck out three on 84 pitches.
Nationals manager Dave Martinez opted to try and get four innings from his bullpen and a four-out save from closer Finnegan.
“In the last inning he walked the leadoff hitter, (then) a dribbler base hit and after that they were staying on his fastball, they hit his fastball really hard," Martinez said. “Just one of those days for Finnegan. He's been unbelievable all year long. He'll be back out there Friday.”
Escobar was in the middle of an impressive 3-6-3 double play in the seventh. He slid into second base to field a low throw from Bell and made the return throw from the ground to get Lewin Diaz at first.
It was the first matchup between rookie starters with the same last name since brothers Greg and Mike Maddux squared off on Sept. 29, 1986.
Marlins: C/OF Jorge Alfaro, who hadn't played since leaving Saturday’s game with left calf tightness, had a pinch-hit single in the eighth inning and left for a pinch runner.
Nationals: Martinez, who underwent left ankle surgery on Sept. 2 and had a follow-up procedure Tuesday, was back on the bench. INF Luis Garcia got the day off.
Marlins: RHP Elieser Hernandez (1-1, 4.14 ERA) starts the opener of a three-game series against the visiting Pirates on Friday.
Nationals: RHP Josiah Gray (0-2, 6.00) opens a three-game series against Colorado on Friday. Gray, then with the Dodgers, made his first major league start against the Rockies on July 25, allowing two runs in four innings.
Everything you need to know about MLB's looming lockout
Will baseball's labor strife halt the hot stove and possibly even delay the 2022 season? We've got answers to all your questions ahead of tonight's deadline.
MLB free-agency tracker: Latest moves, grades and analysis
Need to keep tabs on all the major signings? Want to know how our experts grade the big deals? We've got you covered.
James Paxton, Boston Red Sox agree to 1-year, $10 million deal, sources say
Left-hander James Paxton and the Red Sox are in agreement on a one-year, $10 million contract with a two-year club option, sources said.
Raisel Iglesias, Los Angeles Angels agree to four-year deal, source says
Closer Raisel Iglesias and the Angels have agreed to a four-year contract, a source told ESPN's Jeff Passan.
Major League Baseball, players union no closer to deal with collective bargaining agreement set to expire, sources say
Major League Baseball and the players union are no closer to a new collective bargaining agreement with the expiration of the current one looming, sources said.
Baltimore Orioles reach 1-year deal with veteran 2B Rougned Odor
The Baltimore Orioles have agreed to a one-year deal with second baseman Rougned Odor.