early 13c., lous, loos, lowse, "not securely fixed;" c. 1300, "unbound, not confined," from Old Norse lauss "loose, free, unencumbered; vacant; dissolute," cognate with Old English leas "devoid of, false, feigned, incorrect" (source of -less) from Proto-Germanic *lausaz (source also of Danish løs "loose, untied," Swedish lös "loose, movable, detached," Middle Dutch, German los "loose, free," Gothic laus "empty, vain"), from PIE root *leu- "to loosen, divide, cut apart."
Meaning "not clinging, slack" (of clothes, etc.) is from mid-15c. Meaning "not bundled" is from late 15c. Sense of "unchaste, immoral" ("lax in conduct, free from moral restraint") is recorded from late 15c. Meaning "at liberty, free from obligation" is 1550s. Sense of "rambling, disconnected" is from 1680s. As an adverb, "loosely," from 1590s. A loose end was an extremity of string, etc., left hanging; hence something unfinished, undecided, unguarded (1540s); to be at loose ends is from 1807. Phrase on the loose "free, unrestrained" is from 1749 (upon the loose). Colloquial hang loose is from 1968.
in the figurative sense "wildly irresponsible person, potent person or thing freed from usual restraint," by 1896; in the literal sense an object of dread on old warships; the figurative use probably arose from a celebrated scene in a popular late novel by Victor Hugo:
You can reason with a bull dog, astonish a bull, fascinate a boa, frighten a tiger, soften a lion; no resource with such a monster as a loose cannon. You cannot kill it, it is dead; and at the same time it lives. It lives with a sinister life which comes from the infinite. It is moved by the ship, which is moved by the sea, which is moved by the wind. This exterminator is a plaything. [Victor Hugo, "Ninety Three," 1874]