Shaw and Tyler Saladino had two RBIs each, and Milwaukee won for the seventh time in nine games. Jhoulys Chacin (8-3) allowed four runs and seven hits in 5 2/3 innings. He struck out three and walked three.
Corbin Burnes pitched two perfect innings in his major league debut for the save.
Miami’s Pablo Lopez (1-1) pitched six innings and allowed five runs.
Two-run singles by Yelich and Saladino helped Milwaukee lead 5-3 after two innings. Chacin and Lopez both settled in after that, and Chacin handed off a 5-4 lead to Dan Jennings and the bullpen. Jennings finished up the sixth, Jeremy Jeffress pitched the seventh and Burnes cleaned up after that.
Shaw hit his 16th homer off Javy Guerra in the eighth for a two-run cushion, and Yelich added a two-run double to left in the ninth.
Yelich is batting .292 with 11 homers and 40 RBIs in his first season since being traded by Miami.
Brewers: OF Lorenzo Cain (groin) was given the day off, which was planned as he works himself back after missing 12 games. … LHP Brent Suter (forearm) could return as early as this weekend at Pittsburgh.
Marlins: OF Lewis Brinson (hip) met with a doctor Monday, but his status remains unchanged. "We’re still at no activity and just rehab," manager Don Mattingly said. "Basically rest and rehab right now. I don’t know how long that’s going to be, but I’m assuming it’s until he’s not feeling anything at all before he starts some baseball stuff." … RHP Sandy Alcantara (axillary infection) began his throwing program on his way back.
Brewers: RHP Freddy Peralta (4-1, 2.14 ERA) will take the mound in Wednesday’s series finale for the seventh start in his rookie season.
Marlins: RHP Dan Straily (3-4, 4.55) is 4-0 with a 2.12 ERA in six appearances, five starts, against the Brewers.