Milwaukee scored twice in the second inning and held on to snap the Pirates' four-game winning streak.
Alex Gonzalez doubled home both the Milwaukee runs and Marco Estrada (4-2) made the lead stand up by holding the Pirates to four hits with eight strikeouts over seven innings.
Brandon Kintzler and Mike Gonzalez teamed up to get the Brewers through the eighth inning and Jim Henderson came on to start the ninth.
Henderson gave up a leadoff single to Andrew McCutchen, but then retired the next two batters before being replaced by Rodriguez.
Rodriguez got Neil Walker on a grounder to second to end the game. It was the first save for Rodriguez since last July.
A.J. Burnett (3-5) was tagged with the loss, allowing the second-inning runs on three hits during a seven-inning outing.