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.
Pearce was playing first base for Chris Davis, who was placed on paternity leave before the game. Pearce matched his career high for hits in a game, scored Baltimore's first run and also had an RBI.
Cleveland did all its scoring in the first inning and absorbed only its second loss in seven games.
The Indians used two hits and a walk to load the bases with no outs in the first before Lonnie Chisenhall and Nick Swisher delivered run-scoring flyballs. It was the second sacrifice fly in 241 career games for Chisenhall and Swisher's fourth this season.
Baltimore got a run in the second when Pearce singled, stole second and scored on a bloop single by Jonathan Schoop.
In the third, Pearce hit an RBI single after Cruz doubled with two outs.
NOTES: In addition to placing Davis on paternity leave, Baltimore added C Nick Hundley to the roster, recalled RHP Preston Guilmet from Triple-A Norfolk and optioned INF Steve Lombardozzi to the same minor league club. ... Swisher returned after missing two games with a sore knee. Indians SS Asdrubal Cabrera (leg) missed a third straight start but entered as a pinch hitter in the eighth. ... The Orioles will send Chris Tillman to the mound Monday against NL Central leader Milwaukee. Cleveland travels to Chicago to face the White Sox. ... Cleveland's Michael Brantley extended his hitting streak to 11 games, and teammate David Murphy snapped a 0-for-15 skid with a fifth-inning single. ...Chisenhall has an RBI in six straight games.