Jean Segura's infield single with one out chased Jeremy Hellickson. Lefty Dan Jennings (0-1) entered to face Harper, who drew a walk. Nationals manager Dave Martinez had a right-hander warming up in the bullpen but kept Jennings in to pitch to Hoskins. The cleanup hitter blasted a 1-1 pitch out to left to give Philadelphia a 4-2 lead.
"I was excited I was finally able to do damage against a lefty," said Hoskins, who was batting .240 (6 for 25) against lefties this season before smashing his 10th homer of the season.
It wasn't the first time Hoskins has followed a walk to Harper with a long ball.
"The guy is pretty good. I'd probably pitch around him, too," he said. "The way this lineup is constructed, it's pick your poison."
Jennings has allowed more than double the number of homers to righties than lefties (17-8) in his career in almost the same number of at-bats (699-605) they've had against him. But Martinez liked his chances because of the analytics.
"We had reverse splits against Hoskins," Martinez said.
Hellickson wasn't pleased he left the game.
"There's going to be games where that's probably the right move but the way I was going, I think that was my own and I thought I should've had a chance to get out of there," he said. "Maybe one hard-hit ball since the first inning so I definitely thought I should've stayed out there."
The NL East-leading Phillies have won five of six. The Nationals have lost seven of nine to fall a season-worst five games under .500.
Eickhoff fanned seven, allowing one run and three hits. He was pulled after 87 pitches.
"We have to be cognizant of his workload because he had a short, injury-riddled season last year," Phillies manager Gabe Kapler said.
Adam Morgan tossed a scoreless seventh and set a franchise record for most appearances (16) to start a season without allowing a run. Pat Neshek pitched the eighth and Hector Neris finished for his fifth save in five tries.
Hellickson, who was Philadelphia's opening day starter in 2016 and `17, gave up two runs and four hits, striking out nine in 5 1/3 innings.
Segura lined an opposite-field homer to right to give the Phillies a 1-0 lead in the first.
Harper was 1 for 3 with a double and walk against his former team. He's 7 for 19 (.368) with two homers and six RBI in six games vs. Washington.
Nationals: LF Juan Soto missed his third straight game with back spasms.
Phillies: CF Odubel Herrera is expected to return to the lineup this weekend. Herrera has been sidelined by a right hamstring since April 17.
LHP Patrick Corbin (2-1, 3.58 ERA) goes for the Nationals and RHP Jake Arrieta (4-2, 3.46) starts for the Phillies on Saturday night. Corbin is 3-2 in five career starts vs. Philadelphia. Arrieta is 1-2 with a 5.26 ERA in 13 starts vs. Washington.
More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports
Royals sign former All-Star Trevor Rosenthal to minor league deal
The Kansas City Royals signed former All-Star reliever Trevor Rosenthal to a $2 million minor league contract that includes an invitation to big league spring training and up to $2.25 million in bonuses if he makes the major league roster.
Bomani wants to see the Yankees throw money at Cole
Bomani Jones and Pablo Torre both want to see the Yankees sign Gerrit Cole to a record-setting deal.
Yankees GM rappels building, gets fan's message on Gerrit Cole
Brian Cashman saw a message taped to a 10th-floor window while prepping for a festival in Connecticut. "Please sign Gerrit Cole," it said. The GM's response: "I'm open to do clearly whatever, as always, is important for the Yankees."
Rays' Blake Snell strongly reacts to Tommy Pham trade on Twitch
Rays pitcher Blake Snell apologized for his reaction -- captured during a livestream on Twitch -- to news that teammate Tommy Pham was traded to San Diego.
What's next for the teams that lose the Gerrit Cole sweepstakes?
One team will land the best pitcher on the planet. The rest of his suitors? They'll have to scramble.
Source: Nationals agree to deal with World Series hero Howie Kendrick
Howie Kendrick, who capped the Nationals' improbable run to their first World Series title last season with a Game 7 home run, has reached an agreement on a one-year, $6.25 million deal to return to Washington, a source told ESPN's Jeff Passan on Friday.