ImportanceA decline in nonsuicidal self-injury (NSSI) behavior is often viewed as an indication of mental health improvement when treating adolescents and young adults with borderline personality pathology. However, evidence shows that an initial decrease in NSSI behavior does not always signal recovery, and potential symptom shifting needs to be considered.ObjectiveTo examine the codevelopment of NSSI and substance use in adolescents and young adults receiving treatment for NSSI behavior and to explore whether shifting from NSSI behavior to substance use is associated with emerging or persistent borderline personality pathology.Design, Setting, and ParticipantsThis cohort study used data from the AtR!Sk study. The study included a consecutive sample of adolescents and young adults with NSSI behavior who presented to a specialized outpatient clinic for early intervention of borderline personality pathology. A baseline assessment (between May 3, 2016, and December 19, 2019) and 2 annual follow-up assessments were conducted. Data were analyzed from April 15, 2023, to September 5, 2024.Main Outcomes and MeasuresThe frequencies of NSSI behavior and substance use were self-reported. Diagnostic interviews were carried out to assess borderline personality pathology. Growth mixture models were specified to identify latent classes with different joint trajectories of NSSI behavior and substance use, and the classes were compared for the number of fulfilled borderline personality disorder (BPD) diagnostic criteria.ResultsOverall, 277 adolescents and young adults (249 [89.9%] female; mean [SD] age at baseline, 14.9 [1.5] years) were included in the study (number at first follow-up, 135; number at second follow-up, 82). Three latent classes were extracted from the data. A decline in NSSI behavior following treatment was common. Class 1 (estimated class count: 32.5; 11.7% of participants) was further characterized by a decline in substance use; class 2 (210.1; 75.9% of participants), by a moderate increase in substance use; and class 3 (34.4; 12.4% of participants), by a strong increase in substance use. The number of fulfilled BPD diagnostic criteria in class 1 (mean [SE], 4.64 [0.40]; comparison: χ2, 11.64; P < .001) and class 3 (mean [SE], 4.29 [0.41]; comparison: χ2, 5.98; P = .01) was greater than that in class 2 (mean [SE], 3.18 [0.15]) at baseline. The number of fulfilled BPD criteria remained high at the second follow-up assessment in class 3 (mean [SE], 5.15 [0.84]) but not in class 1 (mean [SE], 2.05 [0.54]).Conclusions and RelevanceIn this cohort study of adolescent patients with NSSI behavior, a decline in this behavior was commonly paired with an increase in substance use. This finding suggests that a decrease in NSSI behavior alone may be insufficient to indicate treatment success. Monitoring the joint trajectories of NSSI behavior and substance use may be a promising avenue toward early detection and targeted treatment of adolescent borderline personality pathology.