"We announce our pledge of allegiance to the caliph Ibrahim Ibn Awad... to listen and obey," the audio recording said, referring to ISIL leader Abu Bakr al-Baghdadi.
The group has waged a campaign of violence from its Sinai Peninsula stronghold that has killed scores of policemen and soldiers since the Egyptian army ousted president Mohamed Mursi in July last year.
It had previously expressed support for ISIL, but stopped short of pledging its allegiance before Monday, even denying it last week.
Interior ministry spokesman Hany Abdel Latif told AFP the announcement would make no difference to Egypt's fight against the militants.
"They are just different names for the same terrorists," he said.