c. 1300, "fixed payment (usually in exchange for taxes collected, etc.), fixed rent," from Old French ferme "a rent, lease" (13c.), from Medieval Latin firma "fixed payment," from Latin firmare "to fix, settle, confirm, strengthen," from firmus "strong; stable," figuratively "constant, trusty" (from suffixed form of PIE root *dher- "to hold firmly, support").
Sense of "tract of leased land" is first recorded early 14c.; that of "cultivated land" (leased or not) is 1520s. A word of confused history, but there is agreement that "the purely agricultural sense is comparatively modern" [Century Dictionary]. There is a set of Old English words that appear to be related in sound and sense; if these, too, are from Latin it would be a very early borrowing. Some books strenuously defend a theory that the Anglo-Saxon words are original (perhaps related to feorh "life").
Phrase buy the farm "die in battle," is from at least World War II, perhaps a cynical reference to the draftee's dream of getting out of the war and going home, in many cases to a peaceful farmstead. The simple term buy it as slang for "suffer a mishap," especially "to die" is attested by 1825, and seems to have been picked up in airmen's jargon. Meanwhile fetch the farm is prisoner slang from at least 1879 for "get sent to the infirmary," with reference to the better diet and lighter duties there.
land n.
Old English lond, land, "ground, soil," also "definite portion of the earth's surface, home region of a person or a people, territory marked by political boundaries," from Proto-Germanic *landja- (source also of Old Norse, Old Frisian Dutch, Gothic land, German Land), perhaps from PIE *lendh- (2) "land, open land, heath" (source also of Old Irish land, Middle Welsh llan "an open space," Welsh llan "enclosure, church," Breton lann "heath," source of French lande; Old Church Slavonic ledina "waste land, heath," Czech lada "fallow land"). But Boutkan finds no IE etymology and suspects a substratum word in Germanic,
Etymological evidence and Gothic use indicates the original Germanic sense was "a definite portion of the earth's surface owned by an individual or home of a nation." The meaning was early extended to "solid surface of the earth," a sense which once had belonged to the ancestor of Modern English earth (n.). Original senses of land in English now tend to go with country. To take the lay of the land is a nautical expression. In the American English exclamation land's sakes (1846) land is a euphemism for Lord.