to detach something from the military, for example by removing forces from a place, getting rid of something's military potential or character, or preventing a place from being used for military purposes;
e.g. The government plans to demilitarize the region by the end of this month.