CAIRO—Militant group Islamic State released a video late Sunday purportedly depicting the beheadings of 21 Egyptian Coptic Christians on a beach in Libya.

The video of the beheadings, the first attacks of this kind on foreigners outside the territory the radical group controls in Syria and Iraq, drew immediate condemnation in Egypt.

The video,...