A statement about the attack, which killed 39 people, appeared on a social media site used in the past by ISIL to claim attacks.
The lone gunman who opened fire indiscriminately in the Reina nightclub, just over an hour into the New Year, is still at large.
More than 40 people are being treated in hospital.
The ISIL statement says the attack is part of operations it is conducting against Turkey, which it describes as “protector of the cross”.
It describes the gunman as an “heroic soldier of the caliphate” who struck what it calls “one of the most famous nightclubs where Christians celebrate their apostate holiday”.
ISIS claims New Year's attack on Istanbul nightclub https://t.co/wMzc9pcpNJ— TIME (@TIME) 2 gennaio 2017
Turkey is part of the US-led coalition that has been fighting ISIL.
Newspaper reports in Istanbul say investigators believe the gunman came from a Central Asian country.
At least 25 of the victims are believed to have been foreigners. (Seamus Kearney - Euronews)
To the victims of the coward and senseless attack in Istanbul. My heart goes out to you and your families. pic.twitter.com/xeHBZE87mq— Caroline Buffa (@CarolineBuffa) 2 gennaio 2017