hog (n.) Look up hog at Dictionary.com
mid-14c., hogge, but probably in Old English (implied late 12c. in hogaster), "a swine," especially a castrated male, "swine reared for slaughter" (usually about a year old), also used by stockmen for "young sheep before the first shearing" (early 14c.) and for "horse older than one year," suggesting the original sense had to do with age, not type of animal. Possibility of British Celtic origin [Watkins, etc.] is regarded by OED as "improbable."

Extended to the wild boar by late 15c. As a term of opprobrium for a greedy or gluttonous person, c. 1400. Meaning "Harley-Davidson motorcycle" is attested from 1967. Road hog is attested from 1886, hence hog "rude person heedless of the convenience or safety of others" (1906). To go hog-wild is American English from 1904. Hog in armor "awkward or clumsy person in ill-fitting attire" is from 1650s (later used of the armadillo).

Phrase to go the whole hog (1828, American English) is sometimes said to be from the butcher shop option of buying the whole slaughtered animal (at a discount) rather than just the choice bits. But it is perhaps rather from the allegorical story (recorded in English from 1779) of Muslim sophists, forbidden by their faith from eating a certain unnamed part of the hog, who debated which part was intended and managed to exempt the whole of it from the prohibition.
hog (v.) Look up hog at Dictionary.com
"to appropriate greedily," 1884, U.S. slang (first attested in "Huck Finn"), from hog (n.). Earlier it meant "Cause to form a horizontal arch" (like the back of a hog), 1798, and "cut a horse's mane short" (so it bristles like a hog's back), 1769. Related: Hogged; hogging.