Background A history of childhood trauma is reportedly more prevalent in people suffering from psychosis than in the general population. Childhood trauma has also been linked to cognitive abnormalities in adulthood, and cognitive abnormalities, in turn, are one of the key clinical features of psychosis. Therefore, this study investigated whether there was a relationship between childhood trauma and cognitive function in patients with first-episode psychosis. The potential impact of diagnosis (schizophrenia or affective psychosis) and gender on this association was also examined. Methods Data were available for 138 first-episode psychosis patients and 138 geographically-matched controls recruited from a catchment area based organisation. History of childhood trauma was obtained using the Childhood Experience of Care and Abuse Questionnaire. Cognitive function was assessed through a comprehensive and standardised neuropsychological test battery. Results A history of childhood trauma was associated with worse cognitive performances, predominantly in affective psychoses, and in male patients. No association between a history of childhood trauma and cognition was found amongst female patients, or female controls. Conclusions The results need replication, but underline the necessity of investigating biological and psychosocial mechanisms underlying these subjects' sensitivity to the negative effect of childhood stress.