The US and Niger have agreed that American troops will leave the country "no later" than 15 September, they announced in a joint statement on Sunday.
They said the two countries had "reached a disengagement agreement to effect the withdrawal of U.S. forces, which has already begun".
The US has relied on Niger as its primary base for monitoring regional jihadist activity.
The statement commended the "joint sacrifices of Nigerien and U.S. forces in the fight against terrorism".
The statement said the withdrawal would not affect the continuation of US-Niger relations.
"The United States and Niger are committed to ongoing diplomatic dialogue to define the future of their bilateral relations," it read.
The deal was reached after marathon talks between the two countries in Niamey.
In March, Niger announced the end of its military agreement with the US. Military spokesperson Col Amadou Abdramane accused the US of raising objections about the allies that Niger had chosen.
Col Abdramane condemned the US for its "condescending attitude" and "threat of reprisals".
Tensions spiked between the US and Niger after elected president, Mohamed Bazoum, was overthrown last year.
Niger is in Africa's Sahel region, considered the new global epicentre of the Islamic State group.
American forces have used two military bases in Niger to monitor Islamist militant groups in the Sahel.
The US built a $100m (£80m) military base there six years ago in the central city of Agadez, 750km (460 miles) north-east of Niamey.
It has played a key role in the US strategy to combat jihadists in West Africa.
The US has more than 1,000 troops stationed at the base.
It is the second Western power to withdraw from Niger.
Last year, Niger expelled former colonial power France's troops, who had also been deployed to fight jihadists.
As Niger has distanced itself from the West, it has drawn closer to Russia.
Last month, Russian military instructors arrived in Niger as part of a new agreement with its military leaders.
Niger has also broken away itself from local democracies and sought stronger regional alliances with fellow junta-led nations Burkina Faso and Mali.
The trio have quit Ecowas - the West African regional body which opposed their military takeovers.
They have also quit the French-backed G5 Sahel force, saying it was ineffectual and undermined African sovereignty, and launched their own defence pact called the Alliance of Sahel States.
Latest Stories
-
Paris 2024: Opening ceremony showcases grandiose celebration of French culture and diversity
3 hours -
How decline of Indian vultures led to 500,000 human deaths
4 hours -
Paris 2024: Ghana rocks ‘fabulous fugu’ at olympics opening ceremony
4 hours -
Trust Hospital faces financial strain with rising debt levels – Auditor-General’s report
5 hours -
Electrochem lease: Allocate portions of land to Songor people – Resident demand
5 hours -
82 widows receive financial aid from Chayil Foundation
5 hours -
The silent struggles: Female journalists grapple with Ghana’s high cost of living
5 hours -
BoG yet to make any payment to Service Ghana Auto Group
5 hours -
‘Crushed Young’: The Multimedia Group, JL Properties surprise accident victim’s family with fully-furnished apartment
6 hours -
Asante Kotoko needs structure that would outlive any administration – Opoku Nti
6 hours -
JoyNews exposé on Customs officials demanding bribes airs on July 29
7 hours -
JoyNews Impact Maker Awardee ships first consignment of honey from Kwahu Afram Plains
8 hours -
Joint committee under fire over report on salt mining lease granted Electrochem
8 hours -
Life Lounge with Edem Knight-Tay: Don’t be beaten the third time
8 hours -
Pro-NPP group launched to help ‘Break the 8’
8 hours