1590s, "to turn a ship on its side" (with the keel exposed, for inspection, repairs, etc.), from French cariner, literally "to expose a ship's keel," from Middle French carene "keel" (16c.), from Italian (Genoese dialect) carena, from Latin carina "keel of a ship," also (and perhaps originally) "nutshell," possibly from PIE root *kar- "hard."
Intransitive sense of "to lean, to tilt" is from 1763 of ships; in general use by 1883. In sense "to rush headlong," confused with career (v.) at least since 1923. [To career is to move rapidly; to careen is to lurch from side to side, often while moving rapidly.] Earlier figurative uses of careen were "to be laid up; to rest." Related: Careened; careening.