Drain the swamp is a military euphemism for a particular type of anti-
guerrilla warfare. Since guerillas usually live off the land, either
raiding villages or receiving aid from them, removing the villages forces the guerrillas to leave or be
exposed. The phrase probably derives from one of the tactics used to kill
mosquitos - by draining the swamps where they breed.
Similar military tactics are urbanization, pacification, and concentration camps. Historically, these have all been used as a means of "draining the swamp" by localizing the rebellious population, usually delineated by ethnicity or religion, within an area easier to control.