MIAMI -- Jeff McNeil joked with manager Mickey Callaway moments before leading off the game about hitting a home run on the first pitch.
Callaway requested McNeil have an 11-pitch at-bat ending with a homer, but McNeil had other plans.
"I just laughed and I said I'll do it on the first pitch," McNeil said.
"(Cano) is obviously barrelling the ball up and the last couple days he's actually getting it in the air and having some good results as far as extra-base hits and homers," Callaway said.
Cano finished 4 for 5 for his first four-hit game since May 7 at San Diego and came a day after he hit a tiebreaking go-ahead homer in the eighth in the Mets' victory.
"It's good to see," Callaway said.
Jacob deGrom (5-7) pitched five innings and allowed six hits and one run for the Mets. He struck out six and walked three.
"Today was a battle," deGrom said. "First inning felt good. Second inning on felt like I was flying open a little bit and having a hard time commanding the baseball."
It was the first road series win for the Mets since sweeping the Marlins on April 1-3.
"It feels like more than a few months," Callaway said. "It's a good way to start the second half. We've got to keep it rolling."
Miami's Sandy Alcantara (4-9) tossed six innings, allowing nine hits and four runs.
"We had the bases loaded with Familia right there, but we had a tough day at the plate," Miguel Rojas said.
Alonso hit a sacrifice fly in the eighth to cap the scoring for the Mets.
Miami's Garrett Cooper hit his 10th home run of the season in the ninth.
McNeil led off the game with a home run, his eighth, on the first pitch thrown by Alcantara. It was McNeil's second leadoff homer of the season. He also knocked in a run in the sixth on a fielder's choice. He is hitting .402 (35 for 87) with five home runs and 18 RBI in his past 21 games.
Rojas, who went 3 for 5, tied the game at 1 with an RBI single in the second.
The Mets scored twice in the fourth on a ground out by Hechavarria and a base hit by Conforto.
"It could have gotten really ugly right there, but (Alcantara) was able to limit the damage," Marlins manager Don Mattingly said.
McNeil's groundout extended the lead to 4-1.
"I think I was throwing a pretty good game," Alcantara said. "They got a lot of soft contact off of me for runs, but I never give up. I want to continue attacking the hitters"
Cano's sixth home run of the season went over the right-field wall in the seventh for a 5-1 lead.
It was the first time Cano has homered in consecutive games since Sept. 2-3, 2017, while with Seattle.
Mets shortstop Amed Rosario did not start for what he believes was for not running out a fly ball that dropped during Saturday's game.
"I think it was because of the consequences of me not running out that flyball," Rosario said through a translator.
Callaway said: "I wouldn't call it disciplinary."
The Mets were leading 4-2 in the eighth when Rosario hit a fly ball to right-center that was misplayed by the Marlins' outfielders, dropping in for a single.
"He knows that he needs to be on second in that situation and a few guys hit him up right after it happened," Callaway said.
Rosario entered Sunday's game in the seventh and doubled in his only at-bat.
Marlins: IF Martin Prado (hamstring) began a rehab assignment with Double-A Jacksonville on Sunday. ... RHP Tayron Guerrero (finger) continued his rehab by throwing a scoreless inning for Class A Jupiter.
Mets: RHP Zack Wheeler (6-6, 4.69 ERA) opens a two-game set at Minnesota on Tuesday. Wheeler allowed six runs in five innings in his previous start against Philadelphia on July 7.
Marlins: RHP Jordan Yamamoto (3-0, 1.24) begins a three-game series against San Diego on Tuesday. Yamamoto has the third-best ERA in the majors since making his debut on June 12.
More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports
GM Jerry Dipoto says slower offseason pace a reflection of where Seattle Mariners are with their roster
General manager Jerry Dipoto said Tuesday that Seattle's more pedestrian approach to the offseason is by design and an indication of where he believes the Mariners are with their roster entering the next stage of their rebuilding plan.
Hall of Fame pitcher Don Sutton dies at 75
Hall of Fame pitcher Don Sutton, who won over 300 games during a major league career that spanned 23 seasons -- mostly with the Dodgers, has died at the age of 75.
Toby Gardenhire to manage Minnesota Twins' Triple-A affiliate
The Twins announced that Toby Gardenhire, son of former major league manager Ron Gardenhire, will manage their new Triple-A affiliate, the St. Paul Saints.
New York Mets GM Jared Porter fired for sending explicit texts, images to reporter
The Mets announced that they fired GM Jared Porter on Tuesday, one day after ESPN reported that Porter had sent explicit texts and images to a reporter in 2016.
Our latest MLB offseason buzz: Second baseman market after LeMahieu, NL DH waiting game and more
Where could teams needing second-base help turn next? How is universal designated hitter indecision holding up free agency? Here's what we're hearing.
Mendoza: Jared Porter story is sad and disappointing
Jessica Mendoza describes the difficulty for women to develop relationships in baseball with management and players.