A two-run single by James Loney put Los Angeles in front for good in the fifth and the Dodgers went on to capture their second straight over the Brewers.
Milwaukee held a 3-1 lead through four innings but Ryan Theriot doubled to open the fifth against Randy Wolf. Theriot went to third on a groundout and Ramirez drew a walk, after which Matt Kemp delivered a sacrifice fly.
A double by Casey Blake sent Ramirez to third and both runners scored on Loney's single.
Ramirez doubled home Theriot in the sixth to give the Dodgers a 5-3 lead.
The Los Angeles Times reported Ramirez had been put on waivers. He is in the second season of a two-year contract and is scheduled to make $20 million in 2010.
Hiroki Kuroda (9-11) claimed the win, going seven innings while giving up four runs on seven hits with six strikeouts.
Wolf (10-10) surrendered four runs in five innings.
Swim Week Miami Beach 2014 [PHOTOS]