School attendance problems (SAPs) are associated with negative short- and long-term outcomes. Despite high prevalence of SAPs, there is a shortage of evidence-based interventions. Existing approaches often target either school refusal or truancy, leaving a gap in effective interventions addressing both types of SAPs. This randomized controlled trial (RCT) assessed the effectiveness of Back2School (B2S), a modular transdiagnostic cognitive behavioral therapy (CBT) for SAPs, compared to treatment as usual (TAU). Outcomes included youths’ school attendance and mental health. A group (B2S, TAU) × time (Pre, Post, 3-Month Follow-Up) design involving 152 youths (B2S; n = 74, TAU; n = 78) with SAPs (i.e., ≥ 10% absence in the past three months), aged 6–16 years (M = 12.2, SD = 2.2, males = 60%) were used. B2S comprised three months of CBT with youths, parents, and school involvement, while TAU comprised public and/or private intervention services. On average, youths in B2S received 15.0, (SD = 3.9) hours of intervention, while those in TAU received 13.4, (SD = 21.6). Intervention effects were investigated using mixed linear models. Both B2S and TAU exhibited significant within-group improvements in school attendance, with no significant differences between them. However, the B2S group significantly outperformed TAU in reducing youths’ emotional problems, conduct problems, problems with peers, the overall impact of problems, and increasing youths self-efficacy for attending school and parent self-efficacy for dealing with a SAP. This RCT represents the first evaluation of a modular transdiagnostic CBT for youths displaying SAPs, showing significant mental health and self-efficacy benefits. (Clinical trial registration: ClinicalTrials.gov: NCT03459677).