Psychiatric symptoms have consistently been associated with negative educational outcomes. However, possible confounding variables, such as comorbid mental and environmental conditions, have not been well addressed. This study examined whether mental health problems were significantly linked to academic performance in a Spanish school-based sample, after adjustment for co-occurring psychiatric symptoms and multiple contextual factors. Parents completed a questionnaire regarding child’s sociodemographic characteristics (i.e., gender, age, type of school, socioeconomic status, ethnicity), stressful events (i.e., adoption, parental divorce/separation, grade retention) and lifestyle (i.e., diet, sleep, screen time), along with the Child Behavior Checklist (CBCL). Academic performance was obtained from school records. The sample comprised 7036 students aged 5–17 with full data on the CBCL. Mixed-effects ordinal logistic regression analyses were conducted to investigate the association between psychopathology and academic achievement, controlling for potential confounders. When examined separately, higher scores on the CBCL scales were related to lower grades, regardless of sociodemographic factors. However, after controlling for the presence of other psychiatric symptoms, we found that students who reported more anxious/depressed and thought problems were less likely to perform poorly, while those with increased levels of attention problems and delinquent behavior had higher risk for academic underachievement. These associations remained mainly the same once stressful events and lifestyle were taken into account. This investigation demonstrates that anxious/depressed symptoms, thought problems, attention problems, and delinquent behavior are independently associated with academic performance, which emphasize the need for preventive and treatment interventions targeted at students’ mental health to improve their psychological well-being and functioning at school.