Santiago Casilla worked the ninth, giving up an RBI single to Ryan Braun, for his 13th save.
It was the second time in the past week that a Giants starter was this dominant. Madison Bumgarner had a perfect game through seven innings on Tuesday night against the Colorado Rockies. Justin Morneau doubled leading off the eighth for Colorado's only hit.
"That doesn't happen too often," Panik said. "To have Bum and Peavy come so close, it's pretty special."
On Saturday, Scooter Gennett made a bid for Milwaukee's first hit in the seventh, but shortstop Brandon Crawford made a diving stop up the middle to start an inning-ending double play.
"I knew I had the play at second," Crawford said. "It was more important to keep the ball in the infield."
Crawford also robbed Aramis Ramirez of a hit in the fifth, going deep into the hole to grab a grounder before making a jump throw to first.
"The two plays Crawford made were outstanding," Brewers manager Ron Roenicke said. "When he made those plays it didn't look good for us."
Peavy, acquired from Boston last month, took a no-hitter into the seventh inning Aug. 2 at the New York Mets.
Peavy, the 2007 NL Cy Young Award winner with San Diego, has never pitched a no-hitter. He got his 2,000th career strikeout when he fanned Ramirez leading off the second.
The Giants scored all three of their runs in the fourth off Mike Fiers (4-2). Sandoval and Hunter Pence singled to start the inning and Michael Morse drilled a two-run double and one out later, Crawford singled home a run.
Fiers gave up three runs and seven hits in seven innings. He walked two and struck out nine.