Adam Jones opened the 10th with a double into the left-field corner off Yoervis Medina (4-2). Nelson Cruz and Chris Davis walked to load the bases.
After J.J. Hardy popped out, Machado hit a flyball to deep center. Machado also singled and scored in the third inning and had an RBI single in the eighth.
The Orioles took three of four in the series, twice winning in extra innings.
T.J. McFarland (4-2) worked one inning for the victory. Zach Britton struck out the side in the 10th for his 20th save in 23 opportunities.
Dustin Ackley had three hits for the Mariners and is batting .375 in 21 games this month.
Mariners reliever Brandon Maurer had not allowed an earned run in 10 previous relief appearances, a span of 15 innings, before Baltimore took a 2-1 lead in the eighth.
The Orioles loaded the bases off Maurer with two outs, then Machado bounced a one-hopper to the left side. Shortstop Chris Taylor caught the ball but threw awkwardly and high to second baseman Robinson Cano, pulling him off the bag. It was ruled a hit and Jones scored.
Orioles reliever Darren O'Day, who had not allowed a run in his previous 14 appearances a stretch of 15 1-3 innings came on in the eighth to protect the lead.
Mike Zunino connected with two outs for his 15th home run. The tying shot was the Mariners' first home run in six games.
The Mariners got four hits in the second inning but managed just one run. Kyle Seager opened with a single off the wall, but was thrown out at second by right fielder Nick Markakis.
Corey Hart and Zunino singled and Taylor, called up Thursday for his first big league experience, got his first RBI with a double.
The Mariners have Monday off. They then open a three-game series against the Indians in Cleveland on Tuesday.