Neurosyphilis is a severe complication of syphilis, a sexually transmitted infection caused by the bacterium Treponema pallidum. This condition occurs when the infection spreads to the central nervous system (CNS), affecting the brain and spinal cord. Neurosyphilis can develop at any stage of syphilis, but it is most commonly associated with untreated or inadequately treated infections.