The adverse effects of PD-1 blockers on the CNS observed in cancer patients could occur through their effects on an enzyme that activates microglia. Pharmacological inhibition of the enzyme in mice reduced microglial activation and cognitive deficit without altering the antitumor capacity of the immunotherapy.