Castillo, who has homered in four consecutive games and has seven on the season, hit a solo drive to left-center in the second and a three-run shot to left in the third that traveled an
estimated 441 feet. It was the first multihomer game of Castillo's career.
Bay had a six-game home run streak snapped Monday, and Castillo said he wants to put together a longer streak.
"I watch Jason Bay every night," Castillo said. "He's such a great player."
Castillo narrowly missed a third home run in the seventh when his high fly ball to center hit off the top of the wall. He was forced to settle for an RBI double. He singled in Ryan Doumit in the eighth for his sixth RBI of the game, the most by a Pirates player this season.
"He had a huge day," teammate Freddy Sanchez said. "These last couple weeks, he's just come out and is hitting the ball hard with authority and he's driving the ball real well."
Sanchez had a career-high four hits, and Jack Wilson went
3-for-5 and scored two runs for the Pirates. Sanchez also drove in two runs and scored twice. Pittsburgh has won four of its last five games.
"It was a great win, obviously," Pirates manager Jim Tracy said. "But it's also great to see it played in the manner in which it was played. We got solid pitching, great defense and we took great team at-bats in a lot of different situations.
"This was just a solid performance throughout the lineup," he said.
Victor Santos (3-5), a former Brewer, allowed one run and three hits in six innings. He retired 10 straight over one stretch.
"The bottom line was I just kept the ball down," Santos said. "My breaking stuff was down. Everything was down."
Sean Casey, playing in only his second game since returning from the disabled list Monday, hit an RBI double to right-center to score Wilson in the third and give Pittsburgh a 2-0 lead. Three batters later, Sanchez's single to center scored Casey. Castillo followed with his second home run to make it 6-0.
"Keep piling it on and bury a team," Wilson said. "That's what you've got to do."
Jorge De La Rosa (2-1), making his first start since Oct. 3, 2004, went three innings, allowing six runs and seven hits. The left-hander left the game with a blister on his left middle finger.
"You can use any excuse you want to be a failure," Milwaukee manager Ned Yost said. "We can sit back and say, 'Oh, woe is us. We don't have Ben or we don't have Tomo or we don't have Rick Helling.'
"Someone else needs to pick up the slack, and let's go. You can look at it any way you want to look at it, but those are the guys we've got and those are the guys we need to get the job done with. And they will," he said.
Yost and Brewers catcher Damian Miller said the team has lacked intensity in being outscored 26-4 the last two nights by the last-place Pirates. Milwaukee has lost three in a row to fall to .500 (26-26).
Bay, who was named National League player of the week for the second week in a row before the contest, has reached safely in 25 of 26 games played during May. ... Pittsburgh has scored 55 runs in its past six games. ... By the end of the fourth inning, each of the Pirates' eight starting position players reached base safely. ... Castillo's only previous four-hit game was Aug. 9 of last season at Colorado.