The aim is to prevent the infiltration of "terrorists" and car bombs into the city, Brigadier General Saad Maan said.
"We began constructing a three-metre-high (10 foot) concrete wall and a trench around the city of Baghdad," he told AFP.
Construction will take place in two phases, with areas north and west of Baghdad being addressed first, followed by other locations, though some will not require a wall or trench due to natural features, Maan said.
After the completion of the first phase, which is expected to take six months, Maan said that 50 per cent of checkpoints inside Baghdad will be removed.
The city is littered with checkpoints that often wave cars through or at most perform cursory searches, adding little to security while causing major traffic jams.
Baghdad is often hit by bombings and other attacks, but security in the capital has improved since IS launched a sweeping offensive in June 2014, likely because the jihadists have subsequently been occupied elsewhere.