Baltimore scored three times in both the first and third innings, then held on to defeat the Yankees for the second straight night.
Those two wins came after the Orioles had lost the first six outings of an eight-game homestand. Baltimore will play its next six on the road.
The win went to Jason Hammel (6-2), who gave up two runs on six hits with six strikeouts in 6 2/3 innings.
New York starter Huroki Kuroda (6-3) left the game in the third with what the Yankees said was a bruised right calf he had suffered one inning earlier. The injury came when he was hit by a line drive off the bat of Manny Machado.
Kuroda was touched for five runs on eight hits.