Herpesviruses are one of the most common groups of pathogens causing central nervous system infections in humans. They mostly cause encephalitis, meningitis, or myelitis in immunocompetent and immunocompromised patients. Children, adults, and the elderly can all be affected. Although contrast-enhanced CT is more widely used for diagnosis, contrast-enhanced MR imaging combined with diffusion-weighted imaging is superior to CT in the detection of early changes and the real extent of the disease, and in assessing prognosis and monitoring response to antiviral treatment. More sophisticated techniques, such as MR spectroscopy and perfusion imaging, can aid in the differential diagnosis of herpesvirus infections from other tumoral, demyelinating, and ischemic processes.