c.1300, "causing misfortune or trouble (to oneself or others)," from un- (1) "not" + happy. Meaning "unfortunate, unlucky" is recorded from late 14c.; sense of "miserable, wretched" is recorded from late 14c. (originally via misfortune or mishap).
early 14c., from un- (2) + happily (see happy). Cf. O.N. unheppiliga.