Duda hit a two-run homer and rookie Jacob deGrom pitched well into the seventh to allow the Mets to split a four-game series with the NL Central-leading Brewers.
"It's huge for us," manager Terry Collins said about going .500 on the swing that also took the Mets to San Diego and Seattle. "When you start the second half with a 10-day road trip and you play two teams that are fighting for the playoffs, it's a big test and our guys rose and played very well."
With the non-waiver trade deadline looming Thursday, the Mets are five games under .500 overall at 50-55 and 6 1/2 games back in the wild card race.
Duda sent an 0-2 slider in the sixth from rookie Jimmy Nelson (1-2) into the second deck above right field to break a scoreless pitcher's duel. It was Duda's third homer in four days in Milwaukee.
Overall, Duda finished with four homers and seven RBIs on the road.
"He's had a tremendous road trip," Collins said. "Let's hope he remains hot."
DeGrom (5-5) held the Brewers to four hits and two walks, exiting with one out in the seventh after allowing two singles. Reliever Vic Black got out of that jam.
DeGrom had location and life on a fastball that peaked in the mid-90s, Brewers manager Ron Roenicke said.
"We didn't square up many balls today," said the skipper.
The closest thing to a rally came in the ninth after Khris Davis reached first on an infield single with one out. The play stood following a replay review.
Mejia got Mark Reynolds to strike out before Segura singled to put the tying run on base. After Overbay grounded out, Mejia savored the save with his animated celebration.
The rookie starters matched scoreless innings early. Nelson allowed four doubles and got into a little trouble in missing high with his sinker, but finished with six strikeouts in seven innings. He was also helped by three double plays.
But that one slider he left up to Duda proved to be the difference. At least Nelson got to smile after singling up the middle in the third for his first career hit in 66 at-bats as a professional, dating back to the minor leagues.
"I think my thumbs are still in the batter's box," Nelson said. "It's been a while since I got one of those, about 10 years."
DeGrom won his fourth straight start, each time getting into the seventh. The most worrisome pitch for the righty came when Reynolds hit a towering fly ball to left that appeared to hit the heavy wires that support Miller Park's retractable roof.
The ball caromed back into fair territory, and Davis, at first, was racing around third when he was held up after the umpires ruled the play foul. DeGrom then struck out Reynolds looking.
The right-hander with curly brown hair flowing out from under his blue cap had hitters swinging through fastballs that peaked in the mid-90s. He finished with four strikeouts and lowered his ERA to 2.81.
"He's been very good. I guess he has to go out each time and prove it," Collins said. "He was very good today."
The Mets improved to 22-13 in day games. ... 3B Aramis Ramirez, who was 2 for 24 on the seven-game homestand, had a day off before popping out in the seventh as a pinch hitter. ... Manager Ron Roenicke indicated 2B Scooter Gennett could return to action full time when the Brewers open a three-game series Monday in Tampa ... Bartolo Colon (9-8) starts when the Mets return to the Citi Field for the first time since the All-Star break to play the Phillies on Monday. ... Kyle Lohse (11-4) opens the three-game series against the Rays for Milwaukee.
Follow Genaro Armas at http://twitter.com/GArmasAP
Piscotty's grand slam ties the game in the 9th
Stephen Piscotty turns on a pitch and deposits it deep into the left-field stands for a grand slam that ties in the game 7-7 in the ninth inning.
Longoria goes long to get the Giants on the board
Evan Longoria hits a 400-foot shot to deep left field to get the Giants on the board.
Sources: Cincinnati Reds player tests positive for coronavirus
A Cincinnati Reds player tested positive for COVID-19 on Friday, jeopardizing the team's game Saturday against the Pittsburgh Pirates, sources told ESPN.
Yordan Alvarez homers in first at-bat of 2020
After beginning the season on the IL due to a positive COVID-19 test, Yordan Alvarez returns to the lineup and hits a home run in his first plate appearance.
Gerrit Cole posts 20th straight regular-season win as Yankees beat Red Sox
Gerrit Cole posted his 20th straight regular-season win on Friday, becoming the sixth pitcher to ever reach the mark. Only Carl Hubbell (24 straight wins) and Roy Face (22) have longer streaks in major league history.
Cardinals manager Mike Shildt says team did nothing 'egregious' to cause outbreak
Cardinals manager Mike Shildt defended his players on Friday, saying they did nothing "egregious" to cause their COVID-19 outbreak.