Goulard, who was previously a member of the European Parliament, said she could not remain in the government while there was a possibility that she could be investigated over alleged misuse of expenses at that parliament.
Her resignation comes as Macron carries out a minor reshuffle of his government following parliamentary elections on Sunday which handed him and his allies MoDem a commanding majority.
Goulard had only been in the defence job for a month following Macron's election to the presidency.
"The president is committed to restoring confidence in public office, reforming France and relaunching Europe," she said in a statement.
Also Read
"This reform agenda must take precedence over any personal considerations.
"That is why I have asked the president, with the agreement of the prime minister, to leave the government."
Earlier this month, Paris prosecutors opened a preliminary investigation into claims in the Canard Enchaine newspaper that MoDem was using European parliamentary funds to pay staff based in France.
Disclaimer: No Business Standard Journalist was involved in creation of this content