Miguel Gonzalez (3-3) bounced back from a shaky start to hold the Indians to two runs and four hits over six innings. He's 3-0 in three career starts against Cleveland.
Zach Britton, the third Orioles reliever, worked a perfect ninth to earn his second save and complete the five-hitter.
Back in the lineup after missing two days with a right groin strain, Machado hit an opposite-field drive to right against Trevor Bauer (1-2) to put Baltimore ahead 3-2 in the fifth.
One out later, Cruz hit his major-league leading 16th home run on a 3-2 pitch.