Primary cilia are specialized cell-surface organelles that mediate sensory perception and, in contrast to motile cilia and flagella, are thought to lack motility function. Here, we show that primary cilia in human and mouse pancreatic islets exhibit movement that is required for glucose-dependent insulin secretion. Islet primary cilia contain motor proteins conserved from those found in classic motile cilia, and their three-dimensional motion is dynein-driven and dependent on adenosine 5'-triphosphate and glucose metabolism. Inhibition of cilia motion blocks beta cell calcium influx and insulin secretion. Human beta cells have enriched ciliary gene expression, and motile cilia genes are altered in type 2 diabetes. Our findings redefine primary cilia as dynamic structures having both sensory and motile function and establish that pancreatic islet cilia movement plays a regulatory role in insulin secretion.