The undated video seen by AFP today portrays the group, which has been steadily retreating recently from Iraqi forces backed by Iran and a US-led coalition and Iran, as still capable of maintaining law and order and dispensing justice.
A masked militant in front of a large crowd to reads out over a loudspeaker the charges of which the men were convicted by the "Islamic Court in the State of Nineveh."
A masked executioner is then shown beheading four men with a sword, after which their bodies are hung on crosses in the back of a small pickup truck.
An IS offensive overran large areas north and west of Baghdad in June, but security forces and allied paramilitaries have succeeded in driving the militants out of much of two provinces north of the capital.
Nineveh, where the video was said to have been shot, was the first to fall to the IS-led drive and is still the jihadist group's main stronghold in the country.
The militants have carried out a wave of abuses in areas they control in Iraq and Syria, including public beheadings, mass executions, enslavement and rape.