Insomnia is related to alexithymia in adults, but the relationship between insomnia and alexithymia in adolescents with major depressive disorder remains unclear. This study aimed to investigate the sex differences and the association between insomnia and alexithymia in adolescents with major depressive disorder. From October 2020 to April 2022, adolescent patients with major depressive disorder were recruited from psychiatric departments of seven hospitals in Anhui Province, China. Their general demographic and clinical information were collected. The 20-item Toronto Alexithymia Scale, the Center for Epidemiologic Studies of Depression Scale, and the Insomnia Severity Index Scale were used to assess their alexithymia, depression, and insomnia symptoms, respectively. The analysis of variance (ANOVA), Student's t-test and Mann-Whitney U-test were used for continuous variables and chi-square tests for categorical variables. Pearson's correlation analysis and Spearman correlation analysis were used to examine the correlation between ISI and demographic and clinical variables. Multiple binary logistic regression analyses with the "Enter" method were carried out to explore the correlations of insomnia. The prevalence of insomnia in female adolescent patients was similar to that of male patients (χ2=1.84, p = 0.175). Compared with those without insomnia, patients with insomnia had worse family relationships (F = 7.71, p = 0.021), perceived heavier academic stress (F = 6.32, p = 0.012), more likely to take sedative-hypnotics (F = 5.51, p = 0.019), had higher levels of depression (F = 81.57, p < 0.001) and alexithymia (F = 28.57, p < 0.001). Correlation analysis showed that alexithymia was significantly associated with insomnia in adolescent patients (r = 0.360, p < 0.01). Binary logistic regression analyses showed that, alexithymia was significantly associated with insomnia in female patients (OR = 1.050, p < 0.05) but not male patients. In female adolescent patients, alexithymia is a risk factor of insomnia, which is of great importance in the understanding of the psychopathological mechanisms, treatments and psychological interventions of insomnia in adolescents with major depressive disorder.