c. 1300, "to unite (things) into a whole, combine, put or bring together; juxtapose," also "unite, be joined" (intrans.), from joign-, stem of Old French joindre "join, connect, unite; have sexual intercourse with" (12c.), from Latin iungere "to join together, unite, yoke," from nasalized form of PIE root *yeug- "to join."
Meaning "unite, become associated, form an alliance" is from early 14c. Meaning "to unite (two persons) in marriage" is from mid-14c. Figuratively (of virtues, qualities, hearts, etc.) from late 14c. Of battles, "to begin," from late 14c. In Middle English join on (c. 1400) meant "to attack (someone), begin to fight with." Meaning "go to and accompany (someone)" is from 1713; that of "unite, form a junction with" is from 1702. Related: Joined; joining.
Join up "enlist in the army" is from 1916. Phrase if you can't beat them, join them is from 1953. To be joined at the hip figuratively ("always in close connection") is by 1986, from the literal sense in reference to "Siamese twins." In Middle English, join sometimes is short for enjoin.