Human herpesviruses may cause infections of the central nervous system during primary infection or following reactivation from a latent state. Especially in immunosuppressed patients the infection can take a life-threatening course, and therefore early diagnosis of herpesvirus-associated neurological diseases should have high priority. Clinical presentation in these patients is usually without typical features, making diagnosis even more challenging. Therefore general broad testing for different herpesviruses in cerebrospinal fluid samples is highly recommended. In addition, determination of the virus DNA level in the cerebrospinal fluid by quantitative assays seems to be of high importance to determine prognosis. Moreover, it might help to differentiate between specific virus-associated disease and unspecific presence of virus in the cerebrospinal fluid, especially in immunocompromised patients. Polymerase chain reaction analysis of cerebrospinal fluid has revolutionized the diagnosis of nervous system viral infections, particularly those caused by human herpesviruses. This review summarizes the role human herpesviruses play in central nervous system infections in immunocompromised patients, with a focus on the clinical manifestation of encephalitis.