Systemic inflammation causes malaise and general feelings of discomfort. This fundamental aspect of the sickness response reduces the quality of life for people suffering from chronic inflammatory diseases and is a nuisance during mild infections like common colds or the flu. To investigate how inflammation is perceived as unpleasant and causes negative affect, we used a behavioral test in which mice avoid an environment that they have learned to associate with inflammation-induced discomfort. Using a combination of cell-type–specific gene deletions, pharmacology, and chemogenetics, we found that systemic inflammation triggered aversion through MyD88-dependent activation of the brain endothelium followed by COX1-mediated cerebral prostaglandin E2 (PGE2) synthesis. Further, we showed that inflammation-induced PGE2 targeted EP1 receptors on striatal dopamine D1 receptor–expressing neurons and that this signaling sequence induced aversion through GABA-mediated inhibition of dopaminergic cells. Finally, we demonstrated that inflammation-induced aversion was not an indirect consequence of fever or anorexia but that it constituted an independent inflammatory symptom triggered by a unique molecular mechanism. Collectively, these findings demonstrate that PGE2-mediated modulation of the dopaminergic motivational circuitry is a key mechanism underlying the negative affect induced by inflammation.