Old English apa (fem. ape) "an ape, a monkey," from Proto-Germanic *apan (source also of Old Saxon apo, Old Norse api, Dutch aap, German affe), probably a borrowed word, perhaps from Celtic (compare Old Irish apa, Welsh epa) or Slavic (compare Old Bohemian op, Slovak opitza), and the whole group probably is ultimately from an Eastern or non-Indo-European language.
The common word until the emergence of monkey in 16c. More technically, in zoology, "a simian; tail-less, man-like monkey" 1690s. The only native apes in Europe are the Barbary apes of Gibraltar, intelligent and docile, and these were the showman's apes of the Middle Ages. Apes were noted in medieval times for mimicry of human action, hence, perhaps, the other figurative use of the word, to mean "a fool" (c. 1300). To go ape (in emphatic form, go apeshit) "go crazy" is 1955, U.S. slang, said to be from the armed forces. To lead apes in hell (1570s) was the fancied fate of one who died an old maid. Middle English plural was occasionally apen. Middle English also had ape-ware "deceptions, tricks."