In the video, militants in black marched the captives, dressed in orange jump suits, to a beach. They were forced down onto their knees, then beheaded. The video appeared on the Twitter feed of a website that supports Islamic State.
A caption on the five-minute video read: "The people of the cross, followers of the hostile Egyptian church."
Egypt's state news agency MENA quoted the spokesman for the Coptic Church as confirming that 21 Egyptian Christians believed to be held by Islamic State were dead.
Thousands of Egyptians have travelled to neighboring Libya in search of jobs since an uprising at home in 2011, despite advice from their government not to go to one of the most dangerous countries in the region.
Before the killings, one of the militants stood with a knife in his hand and said: "Safety for you crusaders is something you can only wish for."
He added: "The sea you have hidden Sheikh Osama Bin Laden's body in, we swear to Allah we will mix it with your blood." In the video, the men are then laid face-down and simultaneously beheaded.
The militant speaker then pointed northward and said, "We will conquer Rome, by Allah's permission."
Relatives of the kidnapped workers had urged Cairo to help secure their release. In the southerly Minya Governorate, relatives screamed and fainted upon hearing news of the deaths.
President Abdel Fattah al-Sisi called a seven-day mourning period and an urgent meeting of Egypt's top military commanders, state television reported.
The Coptic Church said it was confident the Cairo government would seek justice. Al Azhar, the centre of Islamic learning in Egypt, said no religion would accept such "barbaric" acts.
Sisi has repeatedly expressed concerns about militants based in Libya who are seeking to topple his government.
Those militants have made contact with Sinai Province, a group operating from Egypt's Sinai Peninsula that has pledged allegiance to Islamic State.
Sinai Province, formerly known as Ansar Beyt al-Maqdis, has killed hundreds of Egyptian soldiers and police since the army toppled Islamist president Mohamed Mursi in 2013 after mass protests against his rule.
Last month, the Egyptian affiliate of Islamic State insurgents claimed responsibility for coordinated attacks that killed at least 30 security personnel in Sinai.
While most of the worst attacks have hit Sinai, a remote but strategic region bordering Gaza, Israel and Egypt's Suez Canal, smaller blasts and attacks have become increasingly common in Cairo and other cities.
Reuters and the Associated Press contributed to this report.