The Marlins had won a franchise-record 10 straight times when Alvarez made a start, dating back to May 11 at San Diego. The right-hander also had a scoreless-innings streak of 19 1/3 innings against New York snapped.
Before Friday, Alvarez had gone nine straight starts of not allowing more than two earned runs.
"He's been outstanding," Marlins manager Mike Redmond said. "Tonight was not his night, but overall, he's been huge for us. He's given us big innings. He's pitched deep into games. He's done a lot of great things out there and gotten us a bunch of wins. Tonight wasn't his night. Hopefully he will start a new streak in his next start."
Alvarez had his ERA rise from 2.27 to 2.63 in his final start before the All-Star break. He worked just five innings, allowing a season-high six earned runs. Not since giving up eight earned runs against the Rangers on Aug. 12, 2012, had Alvarez yielded as many as six earned runs.
"He's got plus stuff," Mets manager Terry Collins said. "The guy throws 93-95 [mph]. Great changeup. Good breaking ball. Throws pitches, he can pitch backwards if he wants to. He can use his offspeed stuff in hitters' counts. Throw it behind in the count. Great fielder. Handles the bat. There's not a phase of the game he's not good at. He's just one of those guys that when you face him, you better not miss the pitch he's going to give you to hit."
The Mets didn't miss much, and the homers were telling.
"None of the pitches were working like they've always worked," Alvarez said. "I was also leaving pitches up in the zone."
Backed by the big blasts, Zack Wheeler limited the Marlins to one run in 6 2/3 innings, and the right-hander helped himself with an RBI double.
The Marlins have now dropped two straight, and they fell to 3-4 on the road trip.
"Unfortunately for [Alvarez], we weren't able to muster up a whole lot of offense either to bail him out," Redmond said. "Right now, our bats have been quiet. We haven't had a lot going over the last three or four games. We need to pick it up and try to win these next two games and go out on a positive note."
Wright matched his career high with four hits, and for the season, the New York third baseman is now 19-for-42 (.452) with two homers and nine RBIs in 11 games against the Marlins.
The Mets strung together three straight two-out hits in the second inning to claim the lead. They never looked back.
Juan Lagares doubled to right and scored on Ruben Tejada's RBI single to left. Wheeler, who came into the game batting .037, delivered a run-scoring double to the wall in left.
The Mets tacked on pair of runs in the third inning on Duda's no-doubt home run that landed in the second deck in right field.
Wright delivered a crushing blow in the fifth inning, a two-run homer to left that reached the second deck, making it 6-1.
"The home run Duda hit was a high pitch," Alvarez said. "The changeup Wright took out was a little up too."
Alvarez hasn't allowed many home runs this season, giving up just seven. But three have come in his last two starts. The Cardinals' Kolten Wong went deep off the Miami right-hander on Sunday in St. Louis.
The Marlins got on the board against Wheeler in the fifth inning on Christian Yelich's two-out RBI double to left, which scored Jarrod Saltalamacchia, who walked.
Marcell Ozuna went 0-for-4, ending his 15-game hitting streak.
"I'd like for all my starts to be like the 10 before," Alvarez said. "But there are going to be good days and bad days. I have to keep my head up and move on."