Until few years ago, the in vivo immune responses were considered to be identical to the reactions occurring in vivo, but the recent discoveries in the Psychoneuroendocrinoimmunology (PNEI) area have demonstrated that the immune system is under a psychoneuroendocrine regulation, which represents the biochemical mediation of the influence of emotions and consciousness states on the immune system, by allowing the possibility to modulate the immune functions by acting on their neuroendocrine control rather than directly on the immune cells. The immune responses are inhibited by the opioid system, mainly by acting on mu-opioid receptors, whereas they are stimulated by the pineal-cannabinergic system functional axis. The metastatic cancer is characterized by low blood concentrations of IL-2 and IL-12, in association with abnormally high levels of TGF-beta, IL-10 and IL-6, with a following decline in TH-1 lymphocytes and an increase in T regulatory (T reg) cell count. The autoimmune diseases are characterized also by enhanced levels of proinflammatory cytokines, namely IL-17, in association with low values of TGF-beta and IL-10 as the consequence of a decline in T reg cell count. Cancer progression is associated with a progressive decline in the endocrine function of the pineal gland, which may release at least three molecules provided by antitumor activity: melatonin, 5-methoxytryptamine and pinealine. The inhibitory effects of opioids on the anticancer immunity may be abrogated by the administration of the long-acting mu-opioid antagonist naltrexone. The deficiency of pineal indole hormones, which play a fundamental anticancer activity, as well that of the main antitumor cytokines, including IL-2 and IL-12, may be simply corrected by their exogenous administration. Finally, IL-17-induced immunoinflammatory response occurring in the autoimmune diseases may be counteracted by cannabinoid agonists, which may inhibit IL-17 secretion. The pineal hormones also may contribute to inhibit the chronic inflammatory response.