Nonsuicidal self-injury (NSSI) is highly prevalent among individuals with borderline personality disorder (BPD). The aim of this study was to investigate the cognitive, emotional, and contextual experience of NSSI in 107 youth (aged 15–25 years) with BPD who had minimal prior exposure to treatment. Using ecological momentary assessment, participants completed a randomly prompted questionnaire about their affect, self-injurious thoughts, and behaviors six times per day for 6 days. Twenty-four youth with BPD engaged in 52 counts of NSSI, with 56 motives identified. Open-ended questions revealed that on occasions of NSSI, a large minority of participants could identify neither their motives (27%, n = 15) nor the environmental precipitants (46%, n = 24) for NSSI. Changes in affect revealed a pattern of increasing negative and decreasing positive affect prior to NSSI, with a reduction in negative and an increase in positive affect following NSSI. These changes were absent for those who did not engage in NSSI. Initial self-injurious thoughts and changes in negative and positive affect occurred a median of 35, 15, and 10 hr prior to NSSI, respectively. These findings suggest that youth with BPD have limited capacity to reflect on their motives and environment preceding NSSI. The patterns of affect change indicate that NSSI is maintained by reward incentives as well as negative reinforcement. The time between initial self-injurious thoughts and engagement in NSSI reveals a window of opportunity for intervention.