"small, cylindrical drinking vessel, often with a handle," 1560s, "bowl, pot, jug," of unknown origin, perhaps from Scandinavian (compare Swedish mugg "earthen cup, jug," Norwegian mugge "pitcher, open can for warm drinks"), or Low German mokke, mukke "mug," also of unknown origin. Hence mug-hunter (1883) "one who enters sporting contests solely to win prizes" (frequently in the form of engraved cups), a term of contempt.
"a person's mouth or face," 1708, possibly an extended sense of mug (n.1), based on the old drinking mugs shaped like grotesque faces, popular in England from 17c. Sense of "portrait or photograph in police records" had emerged by 1873.
When the notorious "Shaver Good" and his accomplices were arrested, and the robbery of several houses and stores fastened upon them, Good said, with all apparent sincerity, "I have travelled every city in the United States for the last seventeen years, and was never collared before, and I would not have been now, but for that 'mug' of mine that sticks in your gallery. ["Annual Report of the Chief of Police for 1873," Boston, Mass.]
Hence mug-shot (by 1950). Meaning "stupid or incompetent person, dupe, fool, sucker" is by 1851 in thieves' slang; hence "a person" generally (especially "a criminal"), by 1890. Mug's game "foolish, thankless, or unprofitable activity" is by 1890.
"to beat up," 1818, originally "to strike the face" (in pugilism), from mug (n.2) "face." The general meaning "attack" is attested by 1846, and "attack to rob" by 1864. Perhaps influenced by thieves' slang mug "dupe, fool, sucker" (1851). Related: Mugged; mugging.
"make exaggerated facial expressions," 1855, originally theatrical slang, from mug (n.2) "face." Related: Mugged; mugging.