Male voices chant repeatedly in Arabic during the video: "At your service, sister," in an apparent attempt to depict the killings as an act of revenge carried out on behalf of a Sunni women who recently claimed to have been raped by the mainly-Shia security services.
Another male voice says the group is executing the men because the government failed to meet the group's demands to hand over the officers who allegedly assaulted the Sunni woman in Baghdad last month, and to release all Sunni women detainees from Iraqi prisons.
The voice also reads from a statement in Arabic that scrolls across the screen saying that the group brings its leader, Sheikh Abu Omar al-Baghdadi, the "good news that your soldiers do not sleep".
Shouts of 'Allahu Akbar'
After the speech, the video moves to the scene of execution, with the men kneeling on the ground in a line, by a citrus grove, with date palm trees in the background. They are still blindfolded, hands tied behind their back.
Two masked men, with chequered scarves on their heads, fire from handguns at close range into the backs of the men's heads, while a third man carries a black banner ahead of them.
As they are shot, the victims fall, head forward to the ground.
The shooting is accompanied by chants of "Allahu Akbar," or "God is the Greatest".
Earlier on Saturday, the same group posted a text statement on the same website, saying that the 18 security troops were not the same as 14 Iraqi policemen whose bodies were found northeast of Baghdad on Friday.