Several studies have explored the relationship between level of education and medication adherence, as well as the relationship between level of education and cognitive function. However, there have been few studies on the relationships between level of education, cognitive function, and medication adherence. This study aimed to explore whether cognitive function has a mediating effect between level of education and medication adherence in patients with schizophrenia.A total of 329 participants were included in this study. Cognitive function was assessed using the Brief Assessment of Cognition in Schizophrenia, and medication adherence using the Medication Adherence Questionnaire. The relationships between the clinical factors and cognitive function that contributed to medication adherence were tested through multivariable linear regression analysis. The mediating effect of medication adherence was tested using the bootstrapping approach with the PROCESS macro.Family history, insight and executive function were associated with medication adherence in individuals with schizophrenia, and executive function had a mediating effect between level of education and medication adherence.Adopting specific education programs that promote cognitive development as well as actively intervening in executive function might be conducive to improve medication adherence in patients with schizophrenia.