1590s, "mischievous;" 1773 in the sense of "associated with the supernatural," originally Scottish and northern English, apparently from un- (1) "not" + canny (q.v.) in one of its specialized senses in 18c. Scottish English. But canny itself also had 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".