Cystic fibrosis (CF) is a genetic disease caused by mutations in the cystic fibrosis transmembrane conductance regulator gene (CFTR). Cystic fibrosis-related diabetes (CFRD) is the most common comorbidity, affecting more than 50% of adult CF patients. Despite this high prevalence, the etiology of CFRD remains incompletely understood. Studies in young CF children show pancreatic islet disorganization, abnormal glucose tolerance, and delayed first-phase insulin secretion suggesting that islet dysfunction is an early feature of CF. Since insulin-producing pancreatic β-cells express very low levels of CFTR, CFRD likely results from β-cell extrinsic factors. In the vicinity of β-cells, CFTR is expressed in both the exocrine pancreas and the immune system. In the exocrine pancreas, CFTR mutations lead to the obstruction of the pancreatic ductal canal, inflammation, and immune cell infiltration, ultimately causing the destruction of the exocrine pancreas and remodeling of islets. Both inflammation and ductal cells have a direct effect on insulin secretion and could participate in CFRD development. CFTR mutations are also associated with inflammatory responses and excessive cytokine production by various immune cells, which infiltrate the pancreas and exert a negative impact on insulin secretion, causing dysregulation of glucose homeostasis in CF adults. In addition, the function of macrophages in shaping pancreatic islet development may be impaired by CFTR mutations, further contributing to the pancreatic islet structural defects as well as impaired first-phase insulin secretion observed in very young children. This review discusses the different factors that may contribute to CFRD.