Fortes drove an 0-1 pitch from Adam Ottavino (2-2) into the left-field seats as Miami avoided a three-game sweep by the NL East leaders.
"Going up to bat I was looking for a sinker and he threw a really good slider first pitch that I did not see well," Fortes said. "I figured that he'd throw it again so I was sitting on it and thankfully, he threw it there."
Fortes homered for the third time since being called up from the minors May 27. He hit four home runs in another call-up the final two weeks of last season.
"Running around the bases, I felt I was on cloud nine," Fortes said. "My parents were here to see it as well, so it was pretty awesome. A moment I'll never forget it."
New York finished 1 for 13 with runners in scoring position.
Marlins starter Daniel Castano threw a career-high seven innings, giving up two runs. He allowed five hits, walked two and struck out four.
"Really, just trying to slow the game down," said Castano, who allowed leadoff doubles the first two innings but prevented New York from scoring. "Today, that was my goal. I know I got into a little bit of trouble, so what. On to the next pitch."
Mets starter David Peterson also threw seven innings of two-run ball. He gave up four hits and struck out a season-high eight, eclipsing the seven strikeouts he had against Miami in his previous start June 20.
"Their guy pitched well, we knew that with the good cutter-slider mix," Mets manager Buck Showalter said. "I think early on we had a chance to get something on, not let him get his feet on the ground. The good part is how well (Peterson) pitched."
Brandon Nimmo homered to lead off the third and Pete Alonso hit an RBI double later in the inning to put New York ahead 2-1. Nimmo drove Castano's first pitch over the wall in center, while Alonso's blooper to short right rolled toward the foul area and scored Starling Marte from second.
The Marlins responded with Miguel Rojas' solo shot in the bottom half. His drive landed in the left-field seats for his sixth homer.
After Alonso's double, Castano retired 14 of the last 15 batters he faced.
"He has to continue to make pitches and you can't give in," Marlins manager Don Mattingly said. "All of a sudden, he started throwing the ball over the middle of the plate.
For the first time this season, the Mets had the same batting order and defensive positions in consecutive games. Meanwhile, the Marlins did not start outfielders Jorge Soler and Avisaíl García, their notable free agent additions.
The upper deck section at loanDepot Park was opened for the Marlins' second "Bark in the Park" promotion of the season. In addition to Sunday's attendance of 19,343 there were 516 dogs.
The Marlins selected the contract of INF Erik González from Triple-A Jacksonville and designated INF Willians Astudillo for assignment. González started at third base and doubled in three at-bats.
Mets: INF-OF Jeff McNeil (right hamstring tightness) continues to improve but missed his fifth consecutive game.
Marlins: García (hamstring tightness) missed the last two games of the series. .RHP Anthony Bender (back stiffness) is on a throwing progression program at the club's spring training complex in Jupiter, Fla.
Mets: RHP Carlos Carrasco (8-3, 4.42) is scheduled to start the opener of a two-game home series against Houston on Tuesday. Carrasco experienced lower back tightness in his previous outing against the Astros Wednesday and lasted 2 1/3 innings.
Marlins: RHP Pablo López (5-3, 2.61) will start the opener of a three-game series at St. Louis on Monday.