Where did the word ill come from?

The Online Etymology Dictionary (etymology is the study of word origins) says "ill" came from "illr" which was a word in Old Norse. It probably came to English through the viking invasions.

They don't know where the Old Norse word came from.

See http://www.etymonline.com/index.php?term=ill