The polymerase chain reaction (PCR) was used to detect Treponema pallidum DNA in the cerebrospinal fluid (CSF) of patients with and without syphilis. The CSF from 10 of 19 patients with positive serological tests for syphilis who were being investigated for late syphilis were treponemal DNA-positive. In contrast, the CSF from only one of 30 patients with no known history of syphilis was DNA-positive. CSF from 28 HIV-positive patients was also tested. Fourteen of these patients had central nervous system (CNS) disease and seven were DNA-positive, whereas none of the 14 without CNS disease were DNA-positive. Five of the seven DNA-positive patients had a history of syphilis. Such a history in an HIV-positive patient who had CNS disease was predictive of finding treponemal DNA in the CSF. The PCR had a sensitivity of 47% and a specificity of 93% for detecting a known history of syphilis and is a potentially useful tool in treponemal diagnosis.