1737, "a medicine which excites vomiting;" by 1938 as "material thrown up in vomiting," from puke (v.). U.S. colloquial meaning "native of Missouri" (1835) might be a different word, of unknown origin.
It is well known, that the inhabitants of the several western States are called by certain nicknames. Those of Michigan are called wolverines; of Indiana, hooshers; of Illinois, suckers; of Ohio, buckeyes; of Kentucky, corn-crackers; of Missouri pukes, &c. To call a person by his right nickname, is always taken in good part, and gives no offence; but nothing is more offensive than to mis-nickname—that is, were you to call a hoosher a wolverine, his blood would be up in a moment, and he would immediately show fight. [A.A. Parker, "Trip to the West and Texas," Concord, N.H., 1835]
Bartlett (1859) has "A nickname for a native of Missouri" as the second sense of puke (n.), the first being "A mean, contemptible fellow." The association of the state nickname with the "vomit" word is from at least 1858, and folk etymology talks of the old state literally vomiting forth immigrants to California.