With the score tied 4-4 in the top of the ninth, Tony Watson (1-1) hit Zimmerman with a pitch with one out.
The Nationals third-baseman went to second on an Adam Laroche single, advanced to third on a double steal and came home with the tie-breaking run when Moore lofted a fly ball to right field.
Washington's Wilson Ramos had erased a 4-2 deficit with a two-run single in the sixth inning.
Clint Barmes and Starling Marte each socked a two-run homer for the Pirates.
Benedict Cumberbatch's dramatic reading of R. Kelly lyrics is just what you need
Beyonce flaunts bikini body, Blue Ivy in vacation pics