If he is re-elected, “in the subsequent days, as is the tradition, I will present the president with my resignation and that of the government,” Castex told France Inter radio.
“I’m among those who think a new impetus should be found after the president’s re-election,” he added.
Macron is facing a close race in the run-off on Sunday against far-right veteran Marine Le Pen, with analysts warning that low turnout could prove a wildcard even though most polls show Macron in the lead.
The parliamentary vote in June will be a further test of Macron’s popularity, and renewing his majority will be essential for pursuing his reformist agenda, including an overhaul of the pensions system that would require most people to work longer before retiring.
The resignation of Castex would allow Macron to reshuffle his cabinet and bring in new ministers from outside the government.
There has been speculation that European Central Bank chief Christine Lagarde could be offered the post of prime minister, although she sidestepped a question on the issue at a press conference last week.
Opinion polls currently put the centrist Macron at 53 to 56 percent in the run-off against 44 to 47 percent for Le Pen, in a much tighter finish than in 2017, when the same candidates faced, off but Macron carried the vote with 66 percent.
“The game isn’t over yet and we certainly can’t draw conclusions… that this election, this match, is already decided,” Castex said. “We have to convince the French that Emmanuel Macron’s programmes are the best for France and for them.”
Macron and Le Pen will face off Wednesday evening in their first televised debate of the campaign, which could prove critical for winning over millions of voters, in particular on the left, who have told polling firms they remain undecided.