c. 1300, "an (anatomical) joint, a part of a body where two bones meet and move in contact with one another, the structure that holds such bones together," from Old French joint "joint of the body" (12c.), from Latin iunctus "united, connected, associated," past participle of iungere "to join together," from nasalized form of PIE root *yeug- "to join." Related: Joints.
In general use from late 14c., of insect and plant parts, also "that which joins two components of an artificial structure." In butchering, "cut of meat on the bone," early 15c. Slang or cant meaning of "place, building, establishment" (especially one where persons meet for shady activities) first recorded 1877; earlier it was used in an Anglo-Irish context (1821), perhaps on the notion of a private side-room, one "joined" to a main room. In late 19c. U.S. use especially "an opium-smoking den" (1883).
Meaning "marijuana cigarette" (1938) is perhaps from notion of something often smoked in common, but there are other possibilities; earlier joint in drug slang meant "hypodermic outfit" (1935). Meaning "prison" is attested from 1953 but probably is older. Out of joint in the figurative sense "disordered, confused, gone wrong" is from early 15c. (literally, of bone displacement, late 14c.). Joint-stock "of or pertaining to holding stock in shares" is from 1610s.