It did originally refer to a bodily fluid, which is where the psychological meanings come from:
<a href="http:&#x2F;&#x2F;www.etymonline.com&#x2F;index.php?term=humor" rel="nofollow">http:&#x2F;&#x2F;www.etymonline.com&#x2F;index.php?term=humor</a>