Denizlispor confirmed the arrival of Onazi on a free transfer on their Twitter account.
The club said that Onazi and Denizlispor reached an agreement for a six-month contract with an option for a further one year.
Earlier on Wednesday, Super Lig title contenders Trabzonspor terminated their contract with Onazi.
The Black Sea club said on their website that Onazi's deal was ended by mutual termination so he became free agent.
The 27-year-old central midfielder had a contract with Trabzonspor until May 2020.
A former Lazio player, Onazi joined Trabzonspor in 2016.
He scored seven goals and made four assists in 79 matches for the Turkish club.
He was a part of the Nigerian team for the 2018 FIFA World Cup but he didn't play in the tournament.
Onazi had 51 appearances for his nation since Oct. 2012.