Depression is a common neuropsychiatric disorder with long-term recurrent depressed mood, pain and despair, pessimism and anxiety, and even suicidal tendencies as the main symptoms. Depression usually induces or aggravates the development of other related diseases, such as sleep disorders and endocrine disorders. In today’s society, the incidence of depression is increasing worldwide, and its pathogenesis is complex and generally believed to be related to genetic, psychological, environmental, and biological factors. Current studies have shown the key role of glial cells in the development of depression, and it is noteworthy that some recent evidence suggests that the development of depression may be closely related to viral infections, such as SARS-CoV-2, BoDV-1, ZIKV, HIV, and HHV6, which infect the organism and cause some degree of glial cells, such as astrocytes, oligodendrocytes, and microglia. This can affect the transmission of related proteins, neurotransmitters, and cytokines, which in turn leads to neuroinflammation and depression. Based on the close relationship between viruses and depression, this paper provides an in-depth analysis of the new mechanism of virus-induced depression, which is expected to provide a new perspective on the mechanism of depression and a new idea for the diagnosis of depression in the future.