Fox said Thursday that Reilly will be leaving by the end of June. Reilly came from NBC in 2007 to run the network's prime-time entertainment operation, and was promoted to chairman two years ago.
The network had several strong years under Reilly, with the luxury of "American Idol" dominating the TV landscape in the winter and spring. But the show's finale last week had a startling 66 per cent fewer viewers than its season-ending episode three years ago.
While at Fox, Reilly shepherded shows like "Glee," ''Sleepy Hollow" and "Brooklyn Nine-Nine."