The 29-minute video released online on Sunday shows two groups of dark-skinned captives. It says one group is held by an ISIL affiliate in eastern Libya and the other by an affiliate in the south.
A masked fighter delivers a long statement before the video switches between footage of the captives in the south being shot to death and the captives in the east being beheaded on a beach.
The footage released online shows one group of about 12 men being beheaded by armed men on a beach and another group of at least 16 being shot in the head in a desert area.
It was not immediately clear who the captives were.
Redwan Hussein, an Ethiopian government spokesman, told Reuters that he could not immediately confirm the nationalities of the victims.
In a separate interview with AFP news agency, Hussein condemned the killing "whether they are Ethiopians or not."
Ethiopia's embassy in Egypt was working to verify if those killed were indeed Ethiopians, he added.
The video bore the official logo of the ISIL media arm Al-Furqan and resembled previous videos released by the group.
A text on the screen identifies the men as "followers of the cross from the enemy Ethiopian Church".
- Al Jazeera