hey (interj.) Look up hey at Dictionary.com
c. 1200, implying challenge, rebuttal, anger, derision; variously spelled in Middle English hei, hai, ai, he, heh. Later in Middle English expressing sorrow, or concern; also a shout of encouragement to hunting dogs. Possibly a natural expression (compare Roman eho, Greek eia, German hei, Old French hay, French eh).
Þa onswerede þe an swiðe prudeliche, `Hei! hwuch wis read of se icudd keiser!' ["St. Katherine of Alexandria," c. 1200]
In Latin, hei was a cry of grief or fear; but heia, eia was an interjection denoting joy.