BackgroundEpilepsy poses a significant public health problem in many parts of the world. The majority of people with epilepsy (PWE) are from low-income and middle-income countries (LMICs). Taenia solium neurocysticercosis (NCC) is estimated to cause 30% of preventable epilepsy in PWE in areas of T. solium endemicity. This study was conducted to assess the prevalence of NCC in PWE, evaluate the presence of cognitive impairment in PWE and assess potentially contributing factors. MethodsPWE were recruited within a mental health clinic-based cross-sectional study in rural Southern Tanzania. PWE underwent a detailed neurological examination, including mental state, and a blood sample was collected for T. solium cysticercosis (CC) serology testing. Patients who were serologically positive for CC and those detected to have prominent neurological deficits apart from epilepsy were invited to receive a cerebral computed tomography (CT) examination. ResultsOut of the 223 people with epilepsy (PWE) recruited, 221 underwent clinical examination. Among these, 26 (11.8 %) had cognitive impairment, and 2 had neurological signs or symptoms without cognitive impairment. Twenty-five of the 223 PWE (11.2 %) tested positive for CC, of which 4 had cognitive impairment. One hundred and ninety-eight (88.8 %) tested negative for CC, of which 22 had cognitive impairment. A total of 36 participants underwent CT scans, with 18 testing positive and 18 testing negative for CC. Of the 36 who had CT scans, 8 (22.2 %) were diagnosed with NCC; 7 were CC positive, and 1 was CC negative; only the latter had cognitive impairment. Multivariate logistic regression confirmed that cognitive impairment in PWE was 8.62 times higher for Kongwa participants than Chunya, with a statistically significant association (95 % CI: 1.75, 156; p = 0.037). Additionally, having and education was associated with a 91 % reduction in the odds of cognitive impairment (OR = 0.09) compared to no education, which was also statistically significant (95 % CI: 0.01, 0.33; p = 0.002). There was no association between cognitive impairment and NCC. ConclusionOur study found a 22.2 % prevalence of NCC among PWE. Cognitive impairment was present in 11.8 % of PWE but was not significantly associated with NCC. Socioeconomic and educational factors may play a larger role in cognitive impairment among PWE.