Fedde (3-4) had his best outing of the year, using 97 pitches to navigate seven innings while allowing just three hits and striking out four.
With the game scoreless, Fedde walked Stephen Vogt to start the seventh but got the next batter, Domingo Leyba, to ground into a double play.
Hernandez led off the eighth with a home run that curved just inside the left- field foul pole. The Nationals followed his second homer of the year with three more hits and two more runs in the inning, including an RBI double from Trea Turner and an RBI single by Kyle Schwarber.
Daniel Hudson pitched the eighth and Brad Hand handled the ninth to finish the shutout. Hand struck out two and earned his fourth save.
Stefan Crichton (0-2) gave up three runs on four hits in the eighth.
Arizona’s Luke Weaver retired the first eight Nationals batters he faced and pitched four scoreless innings before being pulled from the game after just 68 pitches. The Diamondbacks said he left with “right shoulder discomfort.”
It’s more injury news for the D-backs, who already have 10 players on the injured list. They’re missing five of their eight regular position players, two starting pitchers and three relievers.
Arizona went 3-4 over its seven-game homestand and fell to 18-23 for the season. Washington improved to 16-20.
The Diamondbacks traded infielder Wyatt Mathisen to the Tampa Bay Rays for cash considerations. Mathisen played in 23 games this season and batted .119 with one homer and eight RBIs. He was demoted to Triple-A Reno earlier this month.
Diamondbacks: Manager Torey Lovullo said RHP Chris Devenski (sprained right ulnar collateral ligament) is working with doctors to figure whether he needs to have surgery on his throwing elbow. Devenski was put on the 60-day injured list on Saturday.
The Nationals travel for a four-game series against the Chicago Cubs. They’ll put LHP Jon Lester (0-1, 2.25) on the mound to face Chicago RHP Adbert Alzolay (1-3, 4.50).
The Diamondbacks travel for a four-game series against the Los Angeles Dodgers. They’ll send LHP Madison Bumgarner (4-2, 4.12) to the mound on Monday to face Dodgers RHP Walker Buehler (1-0, 3.45)
More AP MLB: https://apnews.com/hub/MLB and https://twitter.com/AP_Sports