Cognitive function in schizophrenia has been associated with different sociodemographic and clinical variables. Substance use disorder (SUD) history has also been associated with cognition in schizophrenia; however, contradictory results have been found regarding its influence on cognitive function. Our aim was to study the relationship between executive function and a) age, b) duration of illness, c) number of psychotic episodes, d) positive symptoms, and e) negative symptoms, in a sample of schizophrenic patients, and secondly to study whether these relationships persisted after stratification of the sample according to the presence or absence of SUD history. A final sample of 203 schizophrenic patients were evaluated for psychotic symptoms using the PANSS, and assessed using a neuropsychological battery to calculate a composite executive function score. Linear regression analyses were performed, with this executive score as the dependent variable, and age, duration of illness, number of psychotic episodes, positive PANSS score and negative PANSS score as independent variables. For the total sample, the regression model showed three variables to be significant predictors of the executive score: age (p =0.004), number of episodes (p =0.027), and PANSS negative score (p =0.003). However, once the sample was stratified, the regression model showed age (p =0.011) and number of episodes (p =0.011) to be predictor variables for the executive score in the group of schizophrenic patients with SUD history, while age (p =0.028) and PANSS negative score (p =0.006) were predictors in the group of schizophrenic patients without such history. These findings highlight the importance of considering SUD history in studies of cognitive function in schizophrenia.