The Marlins won three of four from the injury-depleted Cubs, who went 1-6 for the week but still have baseball's best record.
Fernandez improved his career record at home to 24-1 with a 1.48 ERA, and this year the right-hander has been pretty good everywhere -- he's 10-3 with a 2.28 ERA and 138 strikeouts.
Giancarlo Stanton doubled and scored the go-ahead run in the sixth for the Marlins, who went 7-3 on their homestand. At 41-35, they're six games above .500 for the first time since June 2012, their first season in Marlins Park.
Jason Hammel (7-4) allowed two runs in six innings, and the Cubs lost his fourth start in a row even though he pitched out of several jams.
Miami was 0 for 10 with runners in scoring position before Christian Yelich singled home an insurance run in the eighth. That run was unearned because of a throwing error by third baseman Kris Bryant.
A replay reversal put the Marlins ahead to stay 2-1 in the sixth. With runners at the corners and one out, the Cubs appeared to turn a 5-4-3 double play, but a review determined Adeiny Hechavarria beat the throw to first.
Fernandez doubled leading off the fifth, and after reaching second base, he pulled up his right sleeve and flexed his biceps.
He showed muscle on the mound, too, with a top speed of 101 mph on the scoreboard radar gun. That came in the fifth inning, when he struck out the side.
Fernandez's streak of 25 consecutive scoreless innings at home ended in the third. Hammel singled to hike his average to .273, and after Chicago loaded the bases, he scored on a sacrifice fly by Bryant.
BY ANY MEANS NECESSARY
Dietrich was twice hit by a pitch -- on the right foot and right elbow -- and now leads NL batters with 13 HBPs.
Cubs: CF Dexter Fowler (right hamstring) is on schedule to return around the time he's eligible to be activated from the disabled list July 4. "When I talk to Dexter, he seems to be in good order," manager Joe Maddon said. "He's not ready yet, but he's doing well." ... INF Tommy La Stella (right hamstring) and LHP Clayton Richard (left middle finger blister) will begin rehab assignments Monday with Triple-A Iowa. ... 2B Ben Zobrist (ankle) returned to the starting lineup and went 0 for 3.
Cubs: RHP Jake Arrieta (11-2, 1.74 ERA) returns to Cincinnati, where he threw a no-hitter April 21, when the Cubs open a three-game series there Monday. Arrieta has a 0.24 ERA in five night starts this year, but is coming off a loss in his most recent outing against St. Louis. RHP Dan Straily (4-4, 3.83) is scheduled to start for the Reds.
Marlins: LHP Adam Conley (4-4, 3.56 ERA) starts Tuesday when the Marlins open a nine-game trip with a two-game series at Detroit. The Tigers swept two games in Miami to start the season.