Introduction Eating disorders (ED) are associated with high rates of suicide attempts and premature mortality. However, data in large samples of adolescents and young adults are limited. This study aims to assess the risk of self-harm and premature mortality in young people hospitalized with an ED. Methods Individuals aged 12 to 25 years old hospitalized in 2013–2014 in France with anorexia nervosa and/or bulimia nervosa as a primary or associated diagnosis were identified from French national health records. They were compared to two control groups with no mental disorders, and with any other mental disorder than ED. The main outcomes were any hospitalization for deliberate self-harm and mortality in the 3 years following hospitalization. Logistic regression models were used. Results This study included 5, 452 patients hospitalized with an ED, 14,967 controls with no mental disorder, and 14,242 controls with a mental disorder other than an ED. During the three-year follow-up, 13.0% were hospitalized for deliberate self-harm (vs. 0.2 and 22.0%, respectively) and 0.8% died (vs. 0.03 and 0.4%). After adjustment, hospitalization with an ED was associated with more self-harm hospitalizations (hazard ratio [HR] = 46.0, 95% confidence interval [32.3–65.3]) and higher all-cause mortality (HR = 12.6 [4.3–37.3]) relative to youths without any mental disorder; less self-harm hospitalizations (HR = 0.5 [0.5–0.6]) but higher mortality (HR = 1.6 [1.0–2.4]) when compared to youths with any other mental disorder. Conclusion Young patients hospitalized with an ED are at high risk of self-harm and premature mortality. It is urgent to evaluate and implement the best strategies for post-discharge care and follow-up.