Birmingham had agreed terms with the 24-year-old to sign him from Turkish club Trabzonspor.
However the Football Association turned down a first application for a work permit for Onazi last week.
An appeal made by the club was rejected on Wednesday despite Onazi being a regular in the Nigeria national team.
Despite appearing in over 80% of the national team games, Onazi failed to earn a permit after the FA considered the West African nation's world ranking in the past two years.
They are ranked 38th in the August 2017 ranking, but Nigeria finished 54th on aggregate over the past two years.
"He'd have been a real quality signing for us," Birmingham boss Harry Redknapp told BBC WM 95.6. "Before that, we lost out on Emmanuel Agyemang-Badubadou from Udinese. He's gone to Turkey for a fortune. Now we've lost Onazi too.
"It's because the country are out of the world Top 50 rankings. Nigeria have dropped to 54th, which stops you getting the permit. If they had been inside the Top 50, it wouldn't have been a problem."
BBC Sport understands that the player and his representatives are bitterly disappointed that the panel rejected an appeal.
Onazi joined current club Trabzonspor from Lazio last year, scoring twice in 27 Turkish Super Lig matches last season.
He has played 38 times for Nigeria and helped the Super Eagles to win the 2013 Africa Cup of Nations and reach the last 16 of the World Cup in Brazil a year later. However, Nigeria have failed to qualify for the past two  Nations Cups.
Nigeria international Ogenyi Onazi has been denied a work permit to play for English Championship side Birmingham City.