Yıldız was originally arrested on 22 July 2016 as part of an investigation into the anonymous Twitter account Fuat Avni, who claimed to be a government insider leaking information on the ruling Justice and Development Party (AKP). On July 24, 2016, a court in Istanbul ordered Yıldız to be detained pending trial, on charges of being a member of an alleged Gülenist terrorist organisation. He was sentenced to 7 years and 6 months, convicted of belonging to the Gulenist organisation which Turkey's government accused of orchestrating the failed July 2016 coup d'état. Yildiz was sentenced in March 2018 along with a number of other journalists who were also accused of belonging to Gulen's network. Other journalists charged in the same case included Ahmet Memiş, Ali Akkuş, Muhammed Sait Kuloğlu, Mustafa Erkan Acar, Oğuz Usluer, Ufuk Şanlı, Cuma Ulus, Mutlu Çölgeçen, Ünal Tanık, Seyid Kılıç and Davut Aydın.