Joint
Middle English: from Old French, past participle of joindre ‘to join’ (see join).
wiktionary
The noun is from Middle English joynt (attested since the late 13th century), from Old French joint(“joint of the body”) (attested since the 12th century). The adjective (attested since the 15th century) is from Old French jointiz. Both Old French words are from Latin iūnctus, the past participle of iungō. See also join, jugular.
The meaning of "building, establishment", especially in connection with shady activities, appeared in Anglo-Irish by 1821 and entered general American English slang by 1877, especially in the sense of "opium den". The sense "marijuana cigarette" is attested since 1935.
etymonline
joint (n.)
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.
joint (adj.)
early 15c., "united or sharing" (in some activity), from Old French jointiz (adj.) "joined together, close together" and Old French joint (14c.), past-participle adjective from joindre "to join, connect, unite," from Latin iungere "to join together," from nasalized form of PIE root *yeug- "to join."