Orioles slugger Nelson Cruz, leading the majors with 20 home runs and 52 RBIs, left in the third inning with a bruised left hand after being hit by a pitch from Scott Feldman. X-rays were negative and Cruz was listed as day to day.
Machado's towering shot capped a six-run sixth inning.
The 21-year-old Machado missed the first month after offseason knee surgery and has struggled since his return, prompting manager Buck Showalter to move him from the second spot to seventh in the batting order. He was back to batting second on Sunday and had two hits for the second straight game, raising his average to .230.
Wei-Yin Chen (6-2) got the win. Feldman (3-3) allowed nine runs in 5 1-3 innings.