"apparently but not really proceeding from gaiety," especially of laughter, a grin, etc., 1630s, from French sardonique (16c.), from Latin sardonius (but as if from *sardonicus) as used in the phrase Sardonius risus, a loan-translation of Greek sardonios gelōs "of bitter or scornful laughter."
The Greek word was altered from Homeric sardanios (which is of uncertain origin) apparently by influence of Sardonios "Sardinian" (see Sardinia) because the Greeks believed that eating a certain plant they called sardonion ("plant from Sardinia") caused facial convulsions resembling those of sardonic laughter (usually followed by death). The etymology has been confused since ancient times and is much debated.
For nuances, see humor (n.). Earlier in same sense sardonian (1580s), from Latin sardonius. Of persons, "bitterly ironical, sarcastic," by 1833. Related: Sardonically.
mid-14c., "fluid or juice of an animal or plant," from Old North French humour "liquid, dampness; (medical) humor" (Old French humor, umor; Modern French humeur), from Latin umor "body fluid" (also humor, by false association with humus "earth"); related to umere "be wet, moist," and to uvescere "become wet" (see humid).
In old medicine, "any of the four body fluids" (blood, phlegm, choler, and melancholy or black bile).
The human body had four humors—blood, phlegm, yellow bile, and black bile—which, in turn, were associated with particular organs. Blood came from the heart, phlegm from the brain, yellow bile from the liver, and black bile from the spleen. Galen and Avicenna attributed certain elemental qualities to each humor. Blood was hot and moist, like air; phlegm was cold and moist, like water; yellow bile was hot and dry, like fire; and black bile was cold and dry, like earth. In effect, the human body was a microcosm of the larger world. [Robert S. Gottfried, "The Black Death," 1983]
Their relative proportions were thought to determine physical condition and state of mind. This gave humor an extended sense of "mood, temporary state of mind" (recorded from 1520s); the sense of "amusing quality, funniness, jocular turn of mind" is first recorded 1680s, probably via sense of "whim, caprice" as determined by state of mind (1560s), which also produced the verb sense of "indulge (someone's) fancy or disposition." Modern French has them as doublets: humeur "disposition, mood, whim;" humour "humor." "The pronunciation of the initial h is only of recent date, and is sometimes omitted ..." [OED].
For aid in distinguishing the various devices that tend to be grouped under "humor," this guide, from Henry W. Fowler ["Modern English Usage," 1926] may be of use:
HUMOR: motive/aim: discovery; province: human nature; method/means: observation; audience: the sympathetic
WIT: motive/aim: throwing light; province: words & ideas; method/means: surprise; audience: the intelligent
SATIRE: motive/aim: amendment; province: morals & manners; method/means: accentuation; audience: the self-satisfied
SARCASM: motive/aim: inflicting pain; province: faults & foibles; method/means: inversion; audience: victim & bystander
INVECTIVE: motive/aim: discredit; province: misconduct; method/means: direct statement; audience: the public
IRONY: motive/aim: exclusiveness; province: statement of facts; method/means: mystification; audience: an inner circle
CYNICISM: motive/aim: self-justification; province: morals; method/means: exposure of nakedness; audience: the respectable
SARDONIC: motive/aim: self-relief; province: adversity; method/means: pessimism; audience: the self