Niger says he stopped the attempted coup just days before his inauguration.
Armed attackers attempted to seize the presidential palace early Wednesday, but were repulsed by the presidential guard, sources said.
Mohammed Bazoum in the presidential election will be sworn in on Friday.
This is a transfer of power between two democratically elected presidents since Niger became independent in 1960.
According to the United Nations Development Program of 189 countries, Niger is the poorest country in the world. Most recently, in 2010, there were four military coups.
Residents of the capital, Niamey, reported an explosion of gunshots early Wednesday at around 03:00 local time (02:00 GMT).
Attackers from nearby air force bases reportedly fled after encountering shootings and artillery.
A government spokesman said numerous arrests had been made and investigators were working to identify who was responsible.
“The government condemns this timid and retrograde act of endangering the democracy and rule of law that our country is resolutely committed to,” he said.
The current president, Mahamadu Ishufu, has resigned after two five-year terms. His successor, Mr. Bazoum, is a former interior minister of the ruling party.
Democratic transfer of power in a coup-prone country won international praise, but Bazoum’s rival Mahamane Ousman rejected the election results.
Following Mr. Bazoum’s victory, not only are attacks by jihadist groups increasing, but political tensions in the country are also increasing.
Earlier this month, Niger saw the worst radical attack in history. When suspicious jihadists targeted three villages, 137 people were killed.