Depression is the leading cause of mortality among mental health disorders. Evidence about the associations of socioeconomic status, social activities, and loneliness with depression is scarce. We aimed to identify whether social activities and loneliness mediate the association between socioeconomic status and depression, and the extent of interactive or joint relationships between social activities, loneliness, and socioeconomic status on depression. In this population-based, cross-national cohort study we used data from five nationally representative surveysacross 24countries between Feb 15, 2008, and Feb 27, 2019: the Health and Retirement Study (HRS); theEnglish Longitudinal Study of Ageing (ELSA); the Survey of Health, Ageing and Retirement in Europe (SHARE); theChina Health and Retirement Longitudinal Study (CHARLS); and the Mexican Health and Ageing Study (MHAS). We included participants who were aged 50years and older with reported information on socioeconomic status, social activities, and loneliness at baseline, and who had been assessed at least twice. We excluded participants with depressive symptoms at baseline; those with missing data on depressive symptoms and covariates; and those lost to follow-up. We defined socioeconomic status as high and low using latent class analysis based on family income, education, and employment status. Depression was assessed using the Center for Epidemiological Studies Depression Scale (CES-D) or EURO-D. We applied Cox proportional hazard models to estimate the association of socioeconomic status with depression. We used random-effects models to obtain pooled results. Joint and interactive effects of socioeconomic status, social activities, and loneliness on depression were explored, and the mediating roles of social activities and loneliness in the association between socioeconomic status and depression were explored using causal mediation analysis. A total of 69 160participants were included in our study and, during a median follow-up of 5years, a total of 20 237participants developed depression with a pooled incidence of 7·2 (95% CI 4·4-10·0) per 100 person-years. Compared with participants with high socioeconomic status, those with low socioeconomic status had a higher risk of depression (pooled hazard ratio [HR] 1·34; 95% CI 1·23-1·44). The proportion of the associations between socioeconomic status and depression mediated by social activities and loneliness were 6·12% (1·14-28·45) and 5·54% (0·71-27·62), respectively. We only observed a significant multiplicative interaction of socioeconomic status and loneliness with depression (pooled HR 0·84; 0·79-0·90). Compared with participants with high socioeconomic status and who were socially active and not lonely, those with low socioeconomic status and who were socially inactive and lonely had a higher risk of depression (pooled HR 2·45; 2·08-2·82). Social inactivity and loneliness positively mediated a small proportion of the association between socioeconomic status and depression, indicating that other approaches in addition to interventions targeting social isolation and loneliness are required to mitigate the risk of depression in older adults. Additionally, the joint effects of socioeconomic status, social activities, and loneliness highlight the benefits of simultaneous and integrated interventions to reduce the global burden of depression. National Natural Science Foundation of China.