The trench will have a single opening for residents to move in and out of the city, which is virtually empty since the offensive that defeated the ISIS militants, said Lt Gen Abdul Wahab AL Saadi, deputy commander of Iraq counterterrorism forces that led the successful campaign.
The trench will be about 7 miles (11 kilometres) long said al-Saadi. Cutting off all roads but one will allow authorities to monitor the movements of residents more closely, AP reports.
Fallujah has been a source of car bombs used against Baghdad, which is 40 miles (65 kilometres) to the east. Restricting traffic will be one way to try to stop any explosives-laden vehicles from leaving the city.
The trenches will be about 40 feet (12.5 metres) wide and 5 feet (1.5 metres) deep. Work has begun on the first leg, running about 4 miles (6 kilometres) on the north and northwest side of the city.
Digging the second leg, which runs 3 miles (5 kilometres) along the south and southeast will begin soon.
12