1620s, "small cup, mug," later of the contents of such a vessel, "small drink" (1690s), a word of unknown origin, possibly related to Norfolk dialectal nog "strong ale." OED considers that the similar Celtic words are "no doubt" from English. Informal meaning "head" is attested by 1866 in American English.