The cause of insulin insufficiency remains unknown in many diabetic cases. Up to 50% adult patients with cystic fibrosis (CF), a disease caused by mutations in the gene encoding the CF transmembrane conductance regulator (CFTR), develop CF-related diabetes (CFRD) with most patients exhibiting insulin insufficiency. Here we show that CFTR is a regulator of glucose-dependent electrical acitivities and insulin secretion in β-cells. We demonstrate that glucose elicited whole-cell currents, membrane depolarization, electrical bursts or action potentials, Ca(2+) oscillations and insulin secretion are abolished or reduced by inhibitors or knockdown of CFTR in primary mouse β-cells or RINm5F β-cell line, or significantly attenuated in CFTR mutant (DF508) mice compared with wild-type mice. VX-809, a newly discovered corrector of DF508 mutation, successfully rescues the defects in DF508 β-cells. Our results reveal a role of CFTR in glucose-induced electrical activities and insulin secretion in β-cells, shed light on the pathogenesis of CFRD and possibly other idiopathic diabetes, and present a potential treatment strategy.