In his book Sundown Towns: A Hidden Dimension of American Racism (2005; New York: Touchstone), James Loewen discusses cities that had a “no Blacks after dark” policy. They were called “sundown towns” because African Americans were actively informed that they should be out of town by sundown; if not, they were subject to arrest or violence. Of course, the purpose of these regulations was to keep Blacks from settling permanently in these towns. If they couldn’t be in town limits after dark, they clearly couldn’t live there. Here is an example of a sundown town: this ad encouraging people to move to Siloam Springs, Arkansas, says, over in the lower right corner, “No Malaria, No Mosquitoes, No Negroes.”

Found here.

NOTE: As Mr. Loewen pointed out in a comment, I had originally said he discussed “cities in the South,” as though that was all his book concentrated on. That was poor wording on my part, as I had been reading the sections of the book that covered some areas in the South I was specifically interested in (particularly Oklahoma). I did not mean to imply that sundown towns existed only in the South or that Mr. Loewen only discusses the South.