Environmental factors, in particular viral infections, are thought to have an important role in the pathogenesis of type 1 diabetes mellitus (T1DM). The COVID-19 pandemic reinforced this hypothesis as many observational studies and meta-analyses reported a notable increase in the incidence of T1DM following infection with SARS-CoV-2 as well as an association between SARS-CoV-2 infection and the risk of new-onset T1DM. Experimental evidence suggests that human β-cells express SARS-CoV-2 receptors and that SARS-CoV-2 can infect and replicate in β-cells, resulting in structural or functional alterations of these cells. These alterations include reduced numbers of insulin-secreting granules, impaired pro-insulin (or insulin) secretion, and β-cell transdifferentiation or dedifferentiation. The inflammatory environment induced by local or systemic SARS-CoV-2 infection might result in a set of signals (such as pro-inflammatory cytokines) that lead to β-cell alteration or apoptosis or to a bystander activation of T cells and disruption of peripheral tolerance that triggers autoimmunity. Other mechanisms, such as viral persistence, molecular mimicry and activation of endogenous human retroviruses, are also likely to be involved in the pathogenesis of T1DM following SARS-CoV-2 infection. This Review addresses the issue of the involvement of SARS-CoV-2 infection in the development of T1DM using evidence from epidemiological, clinical and experimental studies.