On Friday morning Philippe presented his resignation and that of his government, which was accepted by the president, the Elysée Palace said on Friday.
No reason was given in the short statement, but a cabinet reshuffle had been widely expected after President Emmanuel Macron vowed to chart a new course for the last two years of his term.
Philippe's popularity among the French public had been rising in recent weeks in contrast to that of Macron.
A recent poll suggested 57 percent of the French wanted Philippe to stay on as PM.
On Sunday he won re-election to his mayoral seat in the northern port town of Le Havre.
Macron told the regional press on Thursday that la rentrée, meaning the return to work in September after the summer holidays “will be extremely difficult”.
“We need to be prepared,” Macron said.
'A clear signal'
“Right now there's a paradox: the French like their prime minister a lot, but they don't like the government's policies,” he said.
Jeremy Ghez, an associate professor at the Paris business school HEC told The Local: “Changing the government is the best way historically to show that you want to change political course.”
For the next and final phase of his government, Macron would need to redirect its focus towards incorporating more green policies, Ghez said, pointing to the green surge in the local elections as “a clear signal” from the French.
“Macron has shown that he is capable of reinventing himself, but the problem is that, more often than not, the result is politics as usual,” Ghez said.
He and Macron have similar backgrounds. They both studied at Sciences-Po university as well as at the Ecole National d'Administration (ENA), the prestigious grande école where many of France's future leaders are trained.
The two first met at a dinner in 2011.
In 2016 Philippe told journalists that “Macron thinks 90 percent the same way as me”.
“I like him because he is a nice and intelligent person,” said Philippe at the time.