1610s, "territory under the jurisdiction of a lord or officer," from French district (16c.), from Medieval Latin districtus "restraining of offenders, jurisdiction," then under the feudal system "area of jurisdiction, district within which the lord may take and withhold personal property (distrain) for legal reasons." It is a noun use of the past participle of Latin distringere "to draw apart, hinder," also in Medieval Latin "compel, coerce," from dis- "apart" (see dis-) + stringere "draw tight, press together" (see strain (v.)).
Compare distress (v.) which originally in English also had a sense of "constrain or compel." District was used generally of "a limited extent of a country marked off for a special purpose" by 1660s, then vaguely of "any tract of land" by 1712. In the U.S., it generally indicates that the inhabitants act together for some specific purpose (school district, etc.). District attorney is attested by 1789, American English.