Lagares hit his first career grand slam and a two-run shot as the Mets set a team record for homers in a home game by going deep six times, routing Arizona 11-1 Thursday for a four-game sweep.
The Mets outscored the Diamondbacks 26-4 this week.
''We just put everything together,'' manager Mickey Callaway said.
Boosted by Marcus Stroman's longest start since being acquired from Toronto in July, the Mets won for the ninth time in 13 games. New York is two games back of Milwaukee and Chicago for the second NL wild-card spot.
The Diamondbacks lost their fifth straight since winning 11 of 12 to get back into the playoff race. Arizona dropped 3 1/2 games behind and held a brief team meeting afterward.
''We got our butts kicked,'' Arizona manager Torey Lovullo said. ''There's no doubt about it. We didn't pitch well. We didn't hit well and we've to find a way to turn the page, and I think this group will.''
Lagares hit a slam in the third inning and connected again in the fifth, setting a career-high with six RBIs in his first multihomer game.
It was his third homer in the last 15 at-bats after getting two in his previous 227 at-bats. His big day came in his 24th start since Aug. 1 - early this season, he was mostly out of the lineup.
''He's an incredible teammate,'' Mets right fielder Michael Conforto said. ''He hasn't gotten a whole lot of playing time. He's taking advantage of every single opportunity he gets.''
Said Callaway: ''Another guy that the selflessness pays off.''
''He didn't complain. He didn't get down. He didn't let it affect his work. He just kept on working,'' he said.
Conforto hit his 30th homer, Todd Frazier connected for the third time in the series and Robinson Cano and Tomas Nido also went deep. The Mets hit 13 homers in their first four-game sweep of Arizona at home.
Stroman (8-14) allowed one run and four hits in 6 1/3 innings. He struck out six, walked four and took a shutout into the seventh before allowing a double to pinch-hitter Ildemaro Vargas on his last pitch.
Frazier hit his 21st homer in the second and the Mets took advantage of a throwing error by shortstop Nick Ahmed to score five more in the third off Alex Young (7-4).
The Mets hit three homers in the fifth and Lagares' second homer made it 9-0.
Young allowed six runs - one earned - and five hits in a career-low 2 2/3 innings.
''Things just weren't clicking for us this series,'' Young said.
After his third at-bat, Mets rookie Pete Alonso decided to change his appearance, shaving his mustache during the game. He struck out twice and reached on a throwing error before deciding to make a switch.
''I had very terrible at-bats before,'' Alonso said. ''And so I'm like, all right mustache needs to go. Simple as that.''
After changing his look, Alonso struck out for the third time in the sixth and grounded out in the eighth.
Alonso hit his major league-leading 46th and 47th homers Monday and ended Thursday hitless in his last 13 at-bats.
The first baseman said it was not the first time he shaved in the middle of a game, noting: ''Oh yeah, baseball players are very superstitious.''
ROBERTO CLEMENTE NOMINEES
Arizona 2B Eduardo Escobar and Mets LHP Steven Matz were announced as the nominees for the Roberto Clemente Award, which recognizes community service.
Diamondbacks: LHP Robbie Ray (blister left middle finger) remains on track to make his next scheduled start Monday against Miami. Ray allowed five runs and got only two outs on Wednesday after trying to pitch through the blister, which impacted his ability to throw off-speed pitches.
Mets: OF Dominic Smith (fractured left foot) ran and hit off a tee Wednesday for the first time since going on the injured list July 27.
Diamondbacks: RHP Mike Leake (11-10) tries for his first career victory against his former team in the opener of a three-game series at home with Cincinnati. Leake is 0-5 with a 4.53 ERA in nine career starts for the Reds, whom he played for from 2010-15. RHP Luis Castillo (14-6, 3.21 ERA) starts for Cincinnati.
Mets: RHP Noah Syndergaard (10-7, 4.06) opens a three-game series at home against the NL West champion Dodgers and opposes LHP Clayton Kershaw (13-5, 3.06).
More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports
Copyright 2019 by STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.