Alvarez threw seven shutout innings, scattering four hits while striking out five in Miami's 3-0 win at Citi Field.
The Marlins had dropped seven of nine, with both of their wins turned in by Fernandez, whose season was closed down on Wednesday due to an innings limit.
So getting seven strong innings from Alvarez was crucial, especially on a day two games were being played.
Alvarez combined with Chad Qualls and Steve Cishek for the Marlins' 11th shutout win of the season.
"It was big, exactly what we needed, especially with a doubleheader," Miami manager Mike Redmond said. "You know going in it's going to be a long day. To get the solid pitching performance from Alvarez, he looked great."
Cishek converted his 30th save, including 25 in a row.
Mets manager Terry Collins praised Alvarez's performance, and he added that the young Marlins have up-and-coming talent.
"Henderson Alvarez is real good," Collins said. "As I said earlier in the week, these guys have done a tremendous job of securing down good young, talented, good-arm pitchers. They've got pitching."
Donovan Solano homered and scored two runs, while Logan Morrison drove in two runs to help the Marlins snap their two-game slide. The Marlins improved to 11-6 on the season against the Mets.
Alvarez was masterful in his longest outing since also throwing seven innings on Aug. 17 in a loss to the Giants. The right-hander's afternoon was done after 100 pitches, 67 of them for strikes.
New York's Carlos Torres worked six innings, giving up just three hits, but they led to two runs. The right-hander struck out a career-high eight.
Solano led off the sixth inning with a home run to left-center, his third shot of the season. The drive was a bit of payback for the Miami second baseman, who was hit by pitches in each of his first two plate appearances.
After being plunked twice, Solano started to wonder what was going on with Torres. Mets catcher Travis d'Arnaud quickly informed Solano that it wasn't intentional.
"I asked the catcher, 'Why he hit me again?'" Solano said. "He said, 'No, he's human. It's OK.' The pitcher told me, he was sorry about it. It's OK.
"I was thinking about it in my third at-bat. I needed a good pitch. I was a little bit afraid. I didn't want another hit by pitch. I put a good swing on that fastball. It was in the middle of the plate, and I got a home run."
Torres said in his postgame interview that the pitches got away from him.
"I have no clue how I hit Solano twice," Torres said. "I ended up behind a couple of hitters, and just threw too many balls out of the zone."
Solano also came up big with his glove. The second baseman made a terrific play to preserve Alvarez's shutout in the seventh inning. With two outs, and Matt den Dekker, who doubled, on third base, Solano made a nice diving play to snare Omar Quintanilla's hard grounder. He sprung to his feet, and threw to first to end the threat.
"That play at second was unbelievable," Redmond said. "It came at the right time when we needed a play. It saved us a run. On long days, like doubleheaders, you need somebody to step up and be the hero. Today, Alvarez and Solano gave us a big lift."
Through 3 2/3 innings, Torres was in command, logging seven strikeouts before the Marlins had a hit.
But Torres got himself in trouble in the fourth inning by hitting Solano with a pitch for the second time. Christian Yelich drew a walk, and Miami had two on and no outs.
Miami nearly squandered the threat because Torres struck out Giancarlo Stanton and Justin Ruggiano. But the Marlins made their first hit count, because it drove in a run. Morrison dropped a flare into left-center, driving in Solano to open the scoring.
Miami tacked on its third run on a play that resulted in an injury to Mets reliever Frank Francisco. Yelich doubled to open the inning, and he stole third. With runners on the corners and one out, Morrison ripped a liner that struck Francisco's right thumb. The ball caromed to first baseman Lucas Duda, who tagged Morrison out. However, Yelich scored.
"It's tough to see up there too for the hitters, with the shadows," Redmond said. "It was about who could score early. Fortunately, we were able to put a couple of runs up on the board."