Brewers starter Yovani Gallardo got the win in his major league debut. The 21-year-old pitched six and a third innings, allowing just one run.
Barry Bonds, with 748 career home runs, went 1-for-2 with a double in the sixth and two walks as San Francisco lost its fifth game in a row. The Giants have lost 17 of 23 overall.
The Brewers led 5-to-2 when Giants pinch hitter Ray Durham hit a two-run homer down the right field line off reliever Carlos Villanueva in the seventh.
Derrick Turnbow pitched the eighth and got Bonds out on a bouncer to Fielder.
Francisco Cordero walked Omar Vizquel to start the ninth, and after Luis Figueroa failed to advance the runner on a bunt, Durham singled and Dave Roberts walked to load the bases. But Cordero got Randy Winn swinging and Ryan Klesko to ground out for his 26th save in 28 chances.
Fielder, who hit an inside-the-park home run on Sunday in Minnesota, did it the conventional way with a two-run shot in the first.