Musgrove, whose right foot issue forced him to miss his previous turn through the rotation, needed just 72 pitches – 50 of which were strikes -- to improve his record to 10-12 and lower his ERA to 4.52.
During his outing, the athletic right-hander limited the Giants to just four hits and did not walk a batter while striking out seven.
Musgrove also contributed with his bat, as he reached on a leadoff triple in the fifth inning and came around on Adam Frazier’s single.
Pittsburgh managed just eight hits off Giants starter Jeff Samardzija, who fell to 10-12, and two relievers, but they made the most of those hits.
The Pirates took a 1-0 lead in the first on base hits by Bryan Reynolds and Josh Bell and Jose Osuna’s RBI double to left.
Pittsburgh added to its lead in the fourth when Cole Tucker tripled with one out and scored on Kevin Kramer’s sacrifice fly.
The Bucs’ lead grew to 3-0 in the fifth when Musgrove led off the inning with a triple and Frazier followed with his RBI single.
Musgrove gave way to Yacksel Rios in the bottom of the sixth, and the Phillie castoff promptly yielded a single to Buster Posey and a one-out homer to Evan Longoria.
The Pirates got one back and closed the scoring in the seventh when Jacob Stallings slugged his sixth homer of the season, extending the lead to 4-2.
The Bucco bullpen made that lead stand up, although closer Felipe Vasquez provided a few unwanted thrills in the bottom of the ninth.
Vasquez, working for the second straight game and his third in four days, walked leadoff hitter Joey Rickard, then surrendered a single to Donovan Solano, putting runners at first and third with no outs.
But the talented left-hander rallied to post consecutive strikeouts of Austin Slater and Mike Yastrzemski, and induced Posey to ground out to second baseman Frazier, who made a nifty 360-spin and throw from short right field to nail down the win.
Vasquez needed 28 pitches to earn his 28th save.
The Pirates next head for Chicago, where they’ll start a three-game weekend set at 4:05 p.m. Friday at Wrigley Field.
Steven Brault (4-4) will look to bounce back from a rough start his last time out while veteran left-hander Jon Lester (12-10) gets the start for the Cubs.
In his most recent outing Saturday, Brault went just 5 1/3 innings and gave up six hits and six runs – five earned – in a 10-1 loss to the Cardinals. Prior to that start, Brault had given up more than four earned runs in only one of his previous 15 outings, 13 of which were starts.
During that stretch of starts, Brault put together a 2.71 ERA, walking 25 and striking out 59 while allowing 64 hits in 69 2/3 innings.
Lester also is coming off a rough outing, as he was lit up for eight earned runs in 5 1/3 innings in a 12-10 loss to the Brewers Sunday