Security forces were deployed to repel the attack early on Thursday after the gunmen breached the airport security, said the official, who was not authorised to speak publicly about the situation.
It was not immediately clear who the attackers were.
An Associated Press journalist said soldiers were searching people on the road to the airport in the aftermath of the gunfire.
It was the second attack at Diori Hamani International Airport in Niamey in 2026 after the Islamic State group claimed responsibility for a similar attack in January that targeted Niger's drone assets.
Niger, led by a military junta since a 2023 coup, has struggled to contain deadly jihadi violence that has battered parts of Africa's Sahel region, including neighbours Burkina Faso and Mali that are also run by military juntas.
The airport is a strategic hub that hosts a Nigerien air force base as well as the headquarters of the Niger-Burkina Faso-Mali joint military force.
The military has beefed up the airport security following the January attack, but jihadis in Niger and the wider region continue to pose serious threats, analysts say.
"The symbolism of the airport as headquarters for AES will drive intent by militants to target it," said Beverly Ochieng, a senior security analyst at Control Risks, referring to the regional Alliance of Sahel States.