In low-income and middle-income countries, individuals with major depressive disorder often do not receive screening and treatment. We assessed effectiveness and cost-effectiveness of an integrated care model for treating major depressive disorder in Malawi, accounting for two sets of positive externalities: household benefits and improvements in comorbidities. In this stepped-wedge, cluster-randomised, controlled trial, 14 health facilities in Neno District, Malawi, introduced screening, diagnosis, and treatment for people with major depressive disorder, using a stepped-care model of group Problem Management Plus and antidepressant therapy. Adults (ie, aged ≥18 years) residing in facility catchment areas, newly diagnosed with major depressive disorder, and actively enrolled in an integrated chronic care clinic were eligible for inclusion. People identified with high suicidal risk or psychotic symptoms were excluded. Health facilities were categorised into two strata (ie, health centres or secondary hospitals) and randomly allocated to one of five trial sequences, with intervention initiation staggered across sequences in 3-month periods. Participants were masked to trial sequence, data collectors were masked to treatment assignment, and the chief statistician was masked to treatment assignment until analysis. Services were delivered by counsellors and clinical officers at integrated chronic care clinics, and assessments took place at 3-month intervals over 27 months. Primary outcomes were changes in depressive symptom severity (measured with the Patient Health Questionnaire-9 [PHQ-9]), current depressive episode (PHQ-9 score of >10), and functioning (measured with the WHO Disability Assessment Schedule 2.0) over the 27-month period. Longitudinal mixed-effects regression analyses assessed outcomes from an intention-to-treat perspective. The trial was registered with ClinicalTrials.gov (NCT04777006) and is completed. Between Sept 1, 2021, and April 28, 2022, we conducted 15 562 screenings, resulting in 506 (3%) adults identified with major depressive disorder and 487 (3%) enrolled (395 [81%] women and 92 [19%] men). Assignment to IC3D corresponded to a 2·60-point (95% CI -3·35 to -1·86; d -0·61) reduction in depressive symptoms and 1·69-point (-2·73 to -0·65; -0·27) improvement in functioning, reflecting a reduced odds of depression after treatment roll-out (adjusted odds ratio 0·62, 95% CI 0·51 to 0·74). Integrated care for people with major depressive disorder and chronic health conditions is effective at reducing depressive symptoms, improving functioning, and reducing the odds of depression, and facilitates expansion of services through existing infrastructure. National Institute of Mental Health.