Schizophrenia and bipolar disorder are severe mental illnesses (SMI) linked to both genetic and environmental factors. Herpes simplex virus 1 (HSV1) is a common neurotropic pathogen which after the primary infection establishes latency with periodic reactivations. We hypothesized that the latent HSV1 infection is associated with brain structural abnormalities and cognitive impairment, especially in SMI. We included 420 adult patients with SMI (schizophrenia or bipolar spectrum) and 481 healthy controls. Circulating HSV1 immunoglobulin G concentrations were measured with immunoassays. We measured the total grey matter volume (TGMV), cortical, subcortical, cerebellar and regional cortical volumes based on T1-weighted MRI scans processed in FreeSurfer v6.0.0. Intelligence quotient (IQ) was assessed with the Wechsler Abbreviated Scale of Intelligence. Seropositive patients had significantly smaller TGMV than seronegative patients (642 cm 3 and 654 cm 3 , respectively; p = 0.019) and lower IQ (104 and 107, respectively; p = 0.018). No TGMV or IQ differences were found between seropositive and seronegative healthy controls. Post-hoc analysis showed that (a) in both schizophrenia and bipolar spectrum, seropositive patients had similarly smaller TGMV than seronegative patients, whereas the HSV1-IQ association was driven by the schizophrenia spectrum group, and (b) among all patients, seropositivity was associated with smaller total cortical ( p = 0.016), but not subcortical or cerebellar grey matter volumes, and with smaller left caudal middle frontal, precentral, lingual, middle temporal and banks of superior temporal sulcus regional cortical grey matter volumes. The results of this cross-sectional study indicate that HSV1 may be an environmental factor associated with brain structural abnormalities and cognitive impairment in SMI.