Espinoza tied the game 1-1 with a second-inning sacrifice fly and put the Nationals ahead to stay with a two-run blast in the fourth.
Moore added a three-run shot in the eighth to ice the win for Washington, which claimed the rubber match of a three-game series.
Wilson Ramos provided three hits in the victory.
Gio Gonzalez (3-2) limited the Pirates to two runs on five hits over six innings, walking two and striking out five.
Pirates starter Wandy Rodriguez (2-2) struck out seven but was touched for three runs on six hits over six full frames.
Starling Marte smacked a solo homer for the Bucs.
Notable deaths of 2014 [PHOTOS]