''I just thought about seeing the ball and driving the ball to get a hit to try to tie the ballgame, and I got a better result,'' Franco said.
Luis Garcia had three hits for Washington, which has won five of its last seven games.
Top prospect Oneil Cruz hit his first homer of the season for Pittsburgh, which has lost the first four games of its road trip by a combined five runs.
Pirates reliever Chris Stratton (4-4) was an out away from working around Garcia's leadoff double in the eighth when Franco launched a first-pitch slider to left-center, giving the Nationals their first lead of the night.
''He threw him a hanging breaking ball, and in that situation we have to execute a pitch and we did not,'' Pittsburgh manager Derek Shelton said.
Carl Edwards Jr. (2-1) pitched two scoreless innings, and Kyle Finnegan handled the ninth for his first save.
The 6-foot-7 Cruz - who homered during a two-game stint last October when he became the tallest shortstop in major league history - lashed Erick Fedde's 3-1 cutter into the front row in right-center in the fifth inning to give the Pirates a 2-0 lead.
''This kid has unbelievable power,'' Shelton said. ''He hits the ball so dang hard. I thought it was going to be a double and it just continued to go.''
Washington got a run back in the sixth on Yadiel Hernandez's RBI grounder.
Fedde allowed two runs in five innings and struck out four. He's pitched at least five innings in four consecutive starts for the first time since an eight-start streak from April 17-June 18, 2021.
Fedde, who is 2-1 with a 3.27 ERA in his last four outings, threw only 55 of his 100 pitches for strikes.
''It's definitely frustrating, but over my last three starts, I feel like I've at least given the team three opportunities to win,'' Fedde said. ''If I'm working on stuff and that's still the result, I can't be that upset at the end of the day.''
Pittsburgh starter Miguel Yajure, summoned from Triple-A Indianapolis earlier in the day, went four shutout innings, scattering four hits while walking three.
Pirates: Pittsburgh activated INF Josh VanMeter (fractured left ring finger) from the injured list, optioned OF Cal Mitchell to Indianapolis and designated LHP Anthony Banda for assignment. Mitchell hit .193 with two homers and seven RBIs in 26 games. Banda is 1-0 with a 6.41 ERA in 23 games.
Nationals: RHP Anibal Sanchez (cervical nerve impingement) will make a rehabilitation start for Triple-A Rochester on Tuesday, with LHP Josh Rogers (shoulder impingement) also appearing for Rochester this week. Manager Dave Martinez said both will throw around four innings or 60 pitches. ... RHP Victor Arano (knee inflammation) threw a light bullpen session. ... Washington recalled LHP Sam Clay from Rochester and optioned LHP Francisco Perez to Rochester. Perez has a 7.27 ERA in 10 games this season.
Atlanta manager Brian Snitker named Martinez to his coaching staff for the National League's All-Star team next month, a move Martinez appreciated but didn't necessarily see coming.
''I was either going to head to Florida or head to see my farm (in Tennessee),'' Martinez said. ''So my plans changed.''
Pirates: LHP Jose Quintana (1-4, 3.60 ERA) makes his 272nd major-league start - and first at Nationals Park - as the series continues Tuesday.
Nationals: LHP Patrick Corbin (3-10, 6.60) is 4-2 with a 3.14 ERA in 11 career starts against Pittsburgh.
More AP MLB: https://apnews.com/hub/MLB and https://twitter.com/AP-Sports
Copyright 2023 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.