McDonald struck out a career-high nine in 5 1/3 scoreless innings and the Pirates beat the Atlanta Braves 3-1 on Monday night to keep pace in the tight NL Central race.
The Pirates are tied with St. Louis for first place in the division, a half-game ahead of Milwaukee, which was off.
The Braves outhit the Pirates 9-5, but Pittsburgh took advantage of its few scoring chances.
Braves starter Tim Hudson issued three walks in seven innings -- and each of the three scored.
"Championship teams, they make good outs," said Pirates manager Clint Hurdle. "They find a way to score without hits. We were able to find a way of doing that tonight, and we have to."
McDonald (6-4) had the most strikeouts by a Pirates pitcher in almost two years. He gave up eight hits but did not walk a batter and ended each of the first five innings with strikeouts.
"It's really important," McDonald said of avoiding walks. "It's been an issue for me this year. I told myself in the second half I was going to keep my walks down."
McDonald has not allowed a run in two straight wins. He said he is focused on being more aggressive on the mound and staying ahead in the count.
"Being ahead is a big key for me," McDonald said.
"They're a good-hitting team. They're going to get their hits. The thing is to keep the damage to a minimum."
Joel Hanrahan pitched a perfect ninth for his 29th save in 30 chances.
McDonald struck out Alex Gonzalez to end the second inning with runners on first and third. The right-hander struck out Freddie Freeman to end the third with runners on second and third. He fanned Gonzalez again to end the fourth following Nate McLouth's second hit.
The Braves loaded the bases against McDonald with one out in the sixth. Right-hander Chris Resop, who began his career with the Braves, took over and ended the threat on McLouth's popup and Gonzalez's third strikeout.
"I guess I was a little more pumped up than normal, going against Atlanta," Resop said. "It's nice to be in Pittsburgh having success and I guess proving to people I can pitch."
Two walks hurt Hudson (9-7) in Pittsburgh's two-run second inning.
After striking out the side in the first inning, Hudson walked Andrew McCutchen and Pedro Alvarez to open the second. The runners advanced on Lyle Overbay's fly ball to center before McCutchen scored on Ronny Cedeno's groundout to third base. Alvarez scored on Michael McKenry's single to left.
Andrew McCutchen's single drove in Garrett Jones in the sixth for a 3-0 lead.
That was all McDonald would need.
Hudson gave up three runs on five hits and three walks in seven innings. He had eight strikeouts in his first loss since June 15.
"They're a good club. They're not in first place by accident," Hudson said.
"They made their hits count tonight. I feel like I have too good of stuff to give them free passes. You've got to make them earn it. I'm very disappointed on the outcome because my stuff was really good."
Each team had a third baseman return to its active roster as a starter.
Jones, who had arthroscopic surgery on July 9 to repair torn cartilage in his right knee, returned with two hits, including his ninth homer, and a stolen base.
Alvarez had one hit and a walk in his first game back from Triple-A Indianapolis. Alvarez was recalled when the Pirates placed outfielder Alex Presley on the 15-day disabled list with a left hand contusion.
Alvarez bobbled leadoff hitter Martin Prado's grounder for an error on his first chance in the first inning.
Dan Uggla's sixth-inning single stretched his career-best hitting streak to 16 games.
According to the Elias Sports Bureau, Uggla is the first player in modern major-league history -- that is, since 1900 -- with a batting average below .200 at the end of a player's 15th game of a single-season hitting streak. An error against Cincinnati's Miguel Cairo on Sunday was changed to a hit for Uggla on Monday, keeping the streak alive.
The start of the game was delayed 2 hours, 2 minutes by rain.
McDonald's nine strikeouts were the most for the Pirates since RHP Ross Ohlendorf had 11 against St. Louis on Sept. 5, 2009. ... OF Wilkin Ramirez was optioned to Triple-A Gwinnett to clear a roster spot for Jones. ... An X-ray on Monday showed Braves OF Jordan Schafer has a chip fracture in his middle left finger. He struck out as a pinch-hitter in the seventh. ... Manager Hurdle said he had no timetable on Presley's return. ... Andrew McCutchen had his first stolen base since June 24.