Jesús Sánchez also went deep and Jesús Aguilar had two hits for the Marlins, who will attempt to complete their second three-game sweep of the season against Washington on Wednesday.
Rojas’ shot in the fifth inning put Miami ahead 1-0 when he drove starter Joan Adon’s fastball over the wall in left field for his second homer of the season.
The Marlins’ longest-tenured player, Rojas has struggled early this season and began Tuesday with a .190 batting average. He raised it 21 points with his three-hit performance.
“I need to be able to relax a little bit more and let the other guys in this clubhouse, playing baseball for a long time, actually be part of what we want to do,” said Rojas, in his eighth season with Miami.
Sánchez made it 2-0 with his drive off reliever Steve Cishek in the sixth. The homer was Sánchez’s fourth, ending a drought going back to April 21.
Miami starter Cody Poteet retired the first 10 Nationals batters until Juan Soto’s one-out single in the fourth. In his first start of the season after eight relief appearances, Poteet pitched 4 2/3 scoreless innings. He allowed one hit, walked one and struck out four. Poteet extended his scoreless streak to 19 2/3 innings from his six previous relief outings.
“I tried to keep it simple, not thinking too much and trusting myself out there,” Poteet said. “Obviously, amazing hitters every night that you’re facing, so gaining that ability to trust my stuff is huge.”
Anthony Bender (1-3) relieved Poteet and threw one scoreless inning. Four additional Miami relievers combined to get the final 13 outs.
With Poteet adapting to a new role, Marlins manager Don Mattingly had him on a limited pitch count. Poteet exited after throwing 54 pitches.
“That was kind of the end of it no matter what,” Mattingly said. “I couldn’t ask for more.”
Washington reliever Erasmo Ramírez’s two errors and a throwing error by first baseman Josh Bell helped Miami score twice in the seventh. Ramírez misplayed Erik Gonzalez’s sacrifice bunt attempt and then made an errant pickoff throw that got past Bell and scored Rojas from third. Gonzalez sprinted toward third and Bell’s throw eluded third baseman Maikel Franco, allowing Gonzalez to score.
“In those situations we’re trying too hard and create something that’s not there,” Nationals manager Dave Martinez said.
Washington trimmed the deficit on Bell’s sacrifice fly in the eighth before Jacob Stallings’ RBI single in the bottom half gave the Marlins another four-run advantage.
Adon (1-7) was lifted after 4 2/3 innings. The right-hander allowed one run, five hits, struck out two and hit a batter with a pitch.
As Bender took his warmup tosses in relief of Poteet, the alarm system at loanDepot Park went off repeatedly and caused a five-minute delay. Spectators immediately were informed that the system malfunctioned, resulting in the false alarm.
Marlins: OF Bryan De La Cruz sustained a bruised right forearm and left after getting hit by a 96 mph fastball from Adon in the fourth. ... LHP Richard Bleier (undisclosed injury) could soon throw a bullpen and progress to a rehab outing.
RHP Josiah Gray (4-3, 4.34 ERA) will pitch the series finale for the Nationals on Wednesday against RHP Pablo López (4-1, 1.05).
White Sox host the Tigers to open 4-game series
Detroit Tigers (34-47, fourth in the AL Central) vs. Chicago White Sox (39-41, third in the AL Central)
Kiner-Falefa leads Yankees against the Red Sox following 4-hit performance
New York Yankees (59-23, first in the AL East) vs. Boston Red Sox (45-37, second in the AL East)
Alonso leads Mets against the Marlins following 4-hit game
Miami Marlins (39-41, fourth in the NL East) vs. New York Mets (51-31, first in the NL East)
Phillies take on the Nationals with series tied 1-1
Washington Nationals (30-54, fifth in the NL East) vs. Philadelphia Phillies (43-39, third in the NL East)
Dodgers host the Cubs on 3-game home win streak
Chicago Cubs (34-48, third in the NL Central) vs. Los Angeles Dodgers (52-29, first in the NL West)
Astros face the Royals with 2-1 series lead
Kansas City Royals (30-50, fifth in the AL Central) vs. Houston Astros (53-28, first in the AL West)