1520s, probably related to whine and ultimately imitative (compare Latin hinnire).
Entries linking to whinny
whine v.
Old English hwinan "to whiz, hiss, or whistle through the air" (only of arrows), also hwinsian "to whine" (of dogs), ultimately of imitative origin (compare Old Norse hvina "to whiz," German wiehern "to neigh"). Meaning "to complain in a feeble way" is first recorded 1520s. Related: Whined; whining.