Neurosyphilis is a complication of syphilis, a sexually transmitted infection caused by the bacterium Treponema pallidum, that affects the nervous system. It can occur at any stage of syphilis and may lead to a variety of neurological symptoms, including headaches, changes in behavior, cognitive decline, and even seizures. Diagnosis typically involves lumbar puncture to examine cerebrospinal fluid, while treatment usually includes high doses of penicillin. If left untreated, neurosyphilis can result in severe neurological damage.