We performed a real-time PCR assay to detect herpes simplex virus (HSV) DNA, and compared it prospectively with a nested PCR assay in 164 clinical samples (109 cerebrospinal fluid and 55 sera) from patients suspected of having neonatal HSV infection or HSV encephalitis. In 25 of 164 samples, HSV DNA was detected by the nested PCR assay. All samples positive for HSV DNA in the nested PCR assay were also positive in the real-time PCR assay, and all but two samples negative for HSV DNA in the nested assay were negative in the real-time assay. The real-time PCR assay thus had a sensitivity of 100% and a specificity of 99%, when compared with the nested assay. Sequential assays in a case of disseminated HSV showed that a decrease in HSV DNA paralleled clinical improvement. Quantification of HSV DNA by real-time PCR was useful for diagnosing and monitoring patients with HSV encephalitis and neonatal HSV infection.