General de Villiers, 60, was infuriated when Macron, who was elected in May, announced plans to slash military spending by 850 million euros (US$975 million). Most of the cuts will be in equipment for the army, air force and navy.
De Villiers was appointed by President Francois Hollande in 2014, and he was in charge of French military strikes against Daesh in Syria and Iraq following the Paris attacks in November 2015.
Mr. Macron gave him a vote of confidence when he took over in the Elysee Palace, but the pair were soon arguing about the president's plan to hack defense spending in order to reduce the national deficit and conform with EU targets.
De Villiers, who is known for his no-nonsense style, hit out at a parliamentary committee:
"Je ne me laisserai pas baiser comme ca [I won't let you screw me like that]."
"It is not dignified to hold certain debates in the public arena. I am your boss," Mr. Macron told senior officers in a speech at the Defense Ministry earlier in July.
"If the military chief of staff and the president are opposed on something, the military chief of staff goes," Mr. Macron added in an interview with Le Journal du Dimanche on Sunday (July 16).
The pair had been scheduled to meet on Friday (July 21) to sort out their differences, but General de Villiers' departure means Mr. Macron will instead be looking for a new chief of staff of the armed forces.
"He is a great soldier, one of great integrity and intelligence," the former Defense Minister Jean-Yves Le Drian said of de Villiers on Wednesday (July 19).
Mr. Macron has said he wants to get the overall French budget deficit below an EU cap of three percent of national income.
The Defense Ministry is just one of several departments being asked to make cuts.
But perversely Mr. Macron has also said he wants to raise defense spending in 2018 by 1.5 billion euros ($1.73 billion), and has said he will lift it to two percent of GDP by 2025 to fit in with NATO targets.
Démission du général #DeVilliers: mauvaise nouvelle pour l'armée et la Nation. Macron choisit l'irresponsable sacrifice budgétaire.— Florian Philippot (@f_philippot) July 19, 2017
[Tweet: "Resignation of the general #DeVilliers: bad news for the army and the nation. Macron chooses the irresponsible fiscal sacrifice."]
That would mean adding two billion euros (US$2.3 billion) a year — an unprecedented amount in France.
During the election campaign, General Dominique Trinquand, the former head of France's mission to NATO, told Sputnik defense was a key priority for Mr. Macron.
France has the seventh highest defense budget in the world, below Britain and India, but way ahead of Germany, which is still constrained by constitutional limits set after the Second World War.
The budget includes paying for an independent nuclear deterrent, in the form of submarine-launched missiles, and also a large army which has frequently been deployed in former colonial territories like Mali, Chad and the Central African Republic.