in verbal phrase run amok first recorded 1670s, from Malay amuk "attacking furiously." Earlier the word was used as a noun or adjective meaning "a frenzied Malay," originally in the Portuguese form amouco or amuco.
There are some of them [the Javanese] who ... go out into the streets, and kill as many persons as they meet. ... These are called Amuco. ["The Book of Duarte Barbosa: An Account of the Countries Bordering on the Indian Ocean and Their Inhabitants," c.1516, English translation]Cf. amuck.