Objective We investigated whether defense mechanisms in patients with borderline personality disorder (BPD) predict treatment response of dialectical behavior therapy (DBT) and whether they moderate outcome in different treatment lengths. Method We analyzed a subsample of 60 outpatients with BPD, randomized into either 6 (n = 30) or 12 (n = 30) months of DBT. The average level of defensive adaptiveness, assessed with observer-rated overall defensive functioning (ODF) and “immature” (i.e., maladaptive) defenses were used as predictors and moderators of self-reported frequency of self-harm. We conducted a Generalized Linear Mixed Model (GLMM). Results A lower ODF at treatment onset predicted smaller reductions in self-harm, irrespective of treatment length (IRR = 0.92, 95% CI = [0.86, 0.99], p = .020). Lower order “immature” (“major image distorting”) defenses showed significantly smaller (IRR = 1.13, 95% CI = [1.06, 1.21], p < .001) and higher order “immature” (“minor image distorting”) defenses showed significantly larger (IRR = .91, 95% CI = [.85, .97], p = .006) reductions in self harm in the 6-month but not in the 12-month treatment. Conclusion Even though the results have to be regarded as preliminary due to the small sample size, findings might indicate that patients with BPD and lower average defensive adaptiveness may benefit from individualized treatment plans including specific interventions targeting defense function.