1590s, in a now-obsolete meaning "mischievous, malicious;" also in 17c., "careless, incautious; unreliable, not to be trusted," from un- (1) "not" + canny (q.v.) in its old Scots and Northern English sense of "skillful, prudent, lucky" (it is a doublet of cunning).
Canny had also a sense of "superstitiously lucky; skilled in magic." In Wright's "English Dialect Dictionary" (1900) the first sense of uncanny as used in Scotland and the North is "awkward, unskilful; careless; imprudent; inconvenient." The second is "Unearthly, ghostly, dangerous from supernatural causes ; ominous, unlucky ; of a person : possessed of supernatural powers".
From 1773, uncanny appears in popular literature from the North (Robert Fergusson, Scott), with reference to persons and in a sense of "not quite safe to trust or deal with through association with the supernatural." By 1843 it had a general sense in English of "having a supernatural character, weird, mysterious, strange." (OED notes this as "Common from c 1850"; Borges considers it untranslatable but notes that German unheimlich answers to it.)
The Scottish writers also use it with the meanings "unpleasantly hard; dangerous, unsafe."