The pathogenesis of central nervous system (CNS) disease in acquired immunodeficiency syndrome (AIDS) is poorly understood but may be related to specific effects of the immune system. Cytokines such as tumor necrosis factor and interleukin-1 may have toxic effects on CNS cells and have been postulated to contribute to the pathogenesis of the neurological complications of human immunodeficiency virus (HIV) infection. To characterize viral and immunological activity in the CNS, frozen specimens taken at autopsy from the cerebral cortex and white matter of HIV-seropositive and -seronegative individuals were stained immunocytochemically for mononuclear cells, major histocompatibility complex (MHC) antigens, HIV, astrocytes, and the cytokines interleukin-1 and -6, tumor necrosis factor-alpha and -beta, and interferon gamma. Levels of soluble CD4, CD8, and interleukin-2 receptor, as well as interferon gamma, tumor necrosis factor-alpha, beta 2-microglobulin, neopterin, and interleukin-6 and -1 beta were assayed in the cerebrospinal fluid and plasma of many of these individuals during life. The HIV-seropositive group included individuals without neurological disease, those with CNS opportunistic infections, and those with HIV encephalopathy. Perivascular cells, consisting primarily of macrophages with some CD4+ and CD8+ T cells and rare B cells, were consistently MHC class II positive. MHC class II antigen was also present on microglial cells, which were frequently positive for tumor necrosis factor-alpha. HIV p24 antigen, when present, was found on macrophages and microglia. Endothelial cells were frequently positive for interleukin-1 and interferon gamma and less frequently for tumor necrosis factor and interleukin-6. There were gliosis and significant increases in MHC class II antigen, interleukin-1, and tumor necrosis factor-alpha in HIV-positive patients compared to HIV-negative brains. Cerebrospinal fluid from most of the patients tested had increased levels of tumor necrosis factor, beta 2-microglobulin, and neopterin. There was no correlation in HIV-positive individuals between levels of cytokines and the presence or absence of CNS disease. These data indicate that there is a relative state of "immune activation" in the brains of HIV-positive compared to HIV-negative individuals, and suggest a potential role for the immune system in the pathogenesis of HIV encephalopathy.