late 14c., fleem, fleume, "viscid mucus, discharge from a mucous membrane of the body," also the name of one of the four bodily humors, from Old French fleume (13c., Modern French flegme), from Late Latin phlegma, one of the four humors of the body, from Greek phlegma "morbid, clammy bodily humor caused by heat;" literally "inflammation, flame, fire, heat," from phlegein "to burn," related to phlox (genitive phlogos) "flame, blaze," from PIE *bhleg- "to shine, flash," from root *bhel- (1) "to shine, flash, burn."
The modern form of the word is attested by c. 1660. In old physiology it was the "cold, moist" humor of the body and a predominance of it was believed to cause dullness, lethargy, and apathy, hence phlegmatic.