Mr Macron also said on Sunday that France will pull its ambassador out of the country.
France has maintained some 1,500 troops in Niger since the July coup, and had refused an order by the new junta for its ambassador to leave, saying that France didn’t recognise the coup leaders as legitimate.
Niger’s junta said that Mr Macron’s announcement signals a “new step towards the sovereignty” of the country.
“Imperialist and neo-colonialist forces are no longer welcome on our national territory. The new era of cooperation, based on mutual respect and sovereignty is already underway,” it said in a statement.
Tensions had risen in recent weeks between France and Niger, a former French colony, with Mr Macron saying that French diplomats were surviving on military rations as they holed up in the embassy.
Mr Macron’s announcement came after the coup leaders issued a statement earlier on Sunday that they were closing Niger’s airspace to French planes, commercial and military, so that the new leadership could “retake total control of its skies and its territory.″
The decision did not apply to other international aircraft.
Ali Sekou Ramadan, an aide to Niger’s deposed President Mohamed Bazoum, told The Associated Press that Mr Bazoum requested that Mr Macron withdraw the French ambassador, Sylvain Itte, “in order to reduce tension.”
Mr Macron told local reporters he spoke to Mr Bazoum on Sunday and told him that “France has decided to bring back its ambassador, and in the coming hours our ambassador and several diplomats will return to France.”
He added: “We will put an end to our military cooperation with the Niger authorities because they don’t want to fight against terrorism anymore.”
He said the troops would be gradually pulled out, likely by the end of the year, in coordination with the coup leaders “because we want it to take place peacefully”.
Mr Macron said France’s military presence was in response to a request from Niger’s government at the time.
That military cooperation between France and Niger had been suspended since the coup, however.
The junta leaders claimed Mr Bazoum’s government wasn’t doing enough to protect the country from the insurgency. The junta is now under sanctions by Western and regional African powers.
The junta in August gave the French ambassador 48 hours to leave. After the deadline expired without France recalling him, the coup leaders then revoked his diplomatic immunity.
In New York on Friday, the military government that seized power in Niger accused UN Secretary-General Antonio Guterres of obstructing the West African nation’s full participation at the UN’s annual meeting of world leaders in order to appease France and its allies.
Rida Lyammouri, a senior fellow at the Policy Center for the New South, a Morocco-based think tank, said Niger will feel the loss of French support in its fight against violent extremist groups.
“France has been a reliable partner providing support to its operations and Niger simply doesn’t have an alternative to fill this void by the French, at least in short and mid term,” Mr Lyammouri told AP.
Mr Macron last year withdrew French troops from Mali following tensions with the ruling junta after a 2020 coup, and more recently from Burkina Faso, for similar reasons. Both African countries had asked for the French forces to leave.