Brandon Webb (7-4) went seven innings and allowed seven hits and three runs with no walk.
Jose Valverde pitched a scoreless ninth to earn his 22nd save in 25 chances.
Eric Byrnes also homered for the Diamondbacks, who have won three straight.
Loser Chad Bradford (0-4) was charged with two runs while recording just one out in the eighth inning.
Baltimore starter Brian Burres gave up five hits and three runs over seven innings and struck out nine.
The Orioles are in the AL East cellar with an eight-game losing streak.