Tardive dyskinesia (TD), a side effect due to long-term use of antipsychotic medication, is associated with cognitive impairment. Several studies have found sex differences in cognitive impairment in schizophrenia patients, while whether there are sex differences in cognitive performance in schizophrenia patients with TD has not been reported. A total of 496 schizophrenia inpatients and 362 healthy controls were recruited for this study. We used the Positive and Negative Syndrome Scale (PANSS) to assess patients' psychopathological symptoms and the Abnormal Involuntary Movement Scale (AIMS) to assess the severity of TD. Cognitive function was measured in 313 of these inpatients and 310 of healthy controls using the Repeatable Battery for Assessment of Neuropsychological Status (RBANS). Patients with schizophrenia performed worse in all cognitive domains than healthy controls(all p<0.001). Compared to patients without TD, patients with TD had higher PANSS total, PANSS negative symptom subscale and AIMS scores (all p<0.001), while RBANS total, visuospatial/constructional and attention subscale scores were significantly lower (all p<0.05). In addition, the visuospatial/constructional and attention indices remained significantly lower in male patients with TD than those without TD (both p<0.05), but these results were not observed in female patients. Moreover, visuospatial/constructional and attention indices were negatively correlated with total AIMS scores only in male patients (both p<0.05). Our results suggest that there may be sex differences in cognitive impairment in schizophrenia patients with comorbid TD, indicating that female gender may have a protective effect on cognitive impairment in schizophrenia patients caused by TD.