BackgroundInsomnia is considered one of the manifestations of sleep disorders, and its intensity is linked to the treatment effect or suicidal thoughts. Major depressive disorder (MDD) is classified into various subtypes due to heterogeneous symptoms. Melancholic MDD has been considered one of the most common subtypes with special sleep features. However, the brain functional mechanisms in melancholic MDD with insomnia remain unclear.Materials and methodsMelancholic MDD and healthy controls (HCs, n = 46) were recruited for the study. Patients were divided into patients with melancholic MDD with low insomnia (mMDD-LI, n = 23) and patients with melancholic MDD with high insomnia (mMDD-HI, n = 30), according to the sleep disturbance subscale of the 17-item Hamilton Depression Rating Scale. The dynamic amplitude of low-frequency fluctuation was employed to investigate the alterations of brain activity among the three groups. Then, the correlations between abnormal dALFF values of brain regions and the severity of symptoms were investigated.ResultsLower dALFF values were found in the mMDD-HI group in the right middle temporal gyrus (MTG)/superior temporal gyrus (STG) than in the mMDD-LI (p = 0.014) and HC groups (p < 0.001). Melancholic MDD groups showed decreased dALFF values than HC in the right middle occipital gyri (MOG)/superior occipital gyri (SOG), the right cuneus, the bilateral lingual gyrus, and the bilateral calcarine (p < 0.05). Lower dALFF values than HC in the left MOG/SOG and the left cuneus in melancholic MDD groups were found, but no significant difference was found between the mMDD-LI group and HC group (p = 0.079). Positive correlations between the dALFF values in the right MTG/STG and HAMD-SD scores (the sleep disturbance subscale of the HAMD-17) in the mMDD-HI group (r = 0.41, p = 0.042) were found. In the pooled melancholic MDD, the dALFF values in the right MOG/SOG and the right cuneus (r = 0.338, p = 0.019), the left MOG/SOG and the left cuneus (r = 0.299, p = 0.039), and the bilateral lingual gyrus and the bilateral calcarine (r = 0.288, p = 0.047) were positively correlated with adjusted HAMD scores.ConclusionThe occipital cortex may be related to depressive symptoms in melancholic MDD. Importantly, the right MTG/STG may play a critical role in patients with melancholic MDD with more severe insomnia.