The COVID-19 pandemic has exhibited a huge impact on both people's social lives and mental well-being, especially among Chinese college students who are quarantined at school. Previous research has highlighted the significance of childhood maltreatment (CM) in influencing depression among college students during the pandemic. However, limited studies have delved into the underlying mechanism linking CM and depressive symptoms during the pandemic, and previous research has focused on examining CM as a whole, with less attention given to different dimensions of CM. Following the Dimensional Model of Adversity, our current study intended to investigate the relationship between different dimensions of CM (i.e., deprivation and threat) and depressive symptoms during the COVID-19 pandemic. Additionally, it endeavors to uncover the mediation functions of gratitude and self-compassion. This study included 1,721 Chinese college students (842 males and 879 females; Mage = 19.50 years) from quarantined universities who volunteered to participate in the present study and completed questionnaires on CM, gratitude, self-compassion, and depressive symptoms. Regression analyses and mediation analyses were conducted to examine the association between CM and depressive symptoms in the pandemic, as well as the underlying mechanisms (i.e., gratitude and self-compassion) behind this relationship. Regression analysis revealed that childhood threat and deprivation independently predicted depressive symptoms during the pandemic. Mediation analysis further showed that the relationship between childhood deprivation and depressive symptoms was mediated by gratitude and self-compassion, and only self-compassion mediated the relationship between childhood threat and depressive symptoms. This study provides insight into the independent effect of CM from a dimensional model perspective on depressive symptoms amid the COVID-19 pandemic. Furthermore, it highlights gratitude and self-compassion act as the mediators of the link.