The Orioles snapped a three-game skid, with the winning run scoring in the fifth on a double by J.J. Hardy.
Hammel (8-2) allowed five hits and did not walk a batter. The only Washington run scored in the fifth on a throwing error by first baseman Mark Reynolds as he tried finish off a double play.
Jim Johnson worked around a walk in the ninth to pick up his 21st save.
Mark Reynolds hit a solo homer for the Orioles in the second. After Washington tied it in the fifth, Baltimore quickly regained the advantage in the bottom half of the inning. Nick Johnson was hit by a pitch, went to third on a single by Brian Roberts and came in on Hardy's double to left.
Jordan Zimmerman (3-6) gave up both runs on eight hits in seven innings to take the loss.
2014: The Year in Music [PHOTOS]