In a court document seen by AFP, Salem Bazoum was given "provisional release" after having been held with his parents since the presidential guard overthrew took power on July 26, 2023.
It added that it was "up to him to respond to justice as soon as he is required to do so."
The 22-year-old's parents remain in custody at the presidential residence.
The Sahelian nation has been ruled by military leaders since the overthrow of elected president Bazoum, which prompted international condemnation.
The new military regime has distanced itself from Niger's hitherto close European partners — notably France — and has drawn closer to two of its neighbors, Mali and Burkina Faso, which after recent coups are also run by militaries.
Like neighboring Burkina Faso and Mali, Niger has faced persistent jihadist violence, particularly in the so-called Tri-border area where the three Sahel countries meet.
After the ouster of Bazoum, the Economic Community of West African States (ECOWAS) imposed tough economic and financial sanctions on Niamey.
Food prices have risen, and there is a shortage of some basic items such as medicine, in what is one of the world's poorest countries.
Niger is currently suspended from ECOWAS, which has ordered the release of Bazoum and his return to power.
Several former officials of the overthrown government have been arrested, and others are in exile.