Background: Cognitive impairment in the form of decreased working memory and executive functions has been recognized as a key deficit in schizophrenia. Neurotropic viruses have been associated with focal gray matter deficits in patients with schizophrenia. We evaluated whether such agents alter cognitive function in schizophrenia. Methods: The sample consisted of 329 patients diagnosed with schizophrenia or schizoaffective disorder. We evaluated associations between exposure to selected agents (Herpes Simplex Viruses 1 and 2 (HSV1, HSV2 respectively) cytomegalovirus (CMV) and Toxoplasma gondii) and scores on the Trail Making Test (TMT), controlling for relevant variables. Results: Serological evidence of exposure to CMV was associated with impaired performance on TMT part A time to completion (p =0.044), a measure of visual search, working memory, and psychomotor speed. Both CMV and HSV1 were significantly associated with increased errors on TMT part B (p <0.001 for both viruses). HSV2 and T. gondii exposure measures were not associated with any of the cognitive functions evaluated using TMT. Conclusions: Both CMV and HSV1 are associated with impaired cognitive function in schizophrenia as measured by the TMT. Further analyses to evaluate the impact of other illness related variables including genetic variants are warranted.