Substantial evidence indicates that experiencing physical abuse and neglect during childhood significantly elevates the likelihood of developing depression in adulthood. Nevertheless, there remains a dearth of understanding regarding the mechanisms underpinning this correlation. In this study, we aimed to examine the associations of childhood physical abuse and physical neglect with depression using follow-up data from UK Biobank and quantified the contribution of smoking, insomnia, and BMI in these associations. This study included 144,704 participants (64,168 men and 80,536 women) from UK Biobank, most of whom were white (97 %). Physical abuse and physical neglect were measured using two items of Childhood Trauma Screener (CTS). Data on the incidence of depression were obtained from primary care, hospital inpatient records, self-reported medical conditions, and death registries. We used a sequential mediation analysis based on the "g-formula" approach to explore the individual and joint effects of potential mediators. The depression incidence rate was 1.85 per 1000 person-years for men and 2.83 per 1000 person-years for women, respectively. Results of Cox proportional risk regression showed that physical abuse (HRs: 1.39–1.53, P < 0.001) and physical neglect (HRs: 1.43–1.60, P < 0.001) are associated with depression. Smoking, insomnia, and BMI together mediated 3 %–26 % of the associations. These findings contribute to our understanding of how physical abuse and physical neglect influence depression. Furthermore, a more effective reduction in the burden of depression can be achieved by managing modifiable mediators.