Aims/hypothesis Enteroendocrine K and L cells are pivotal in regulating appetite and glucose homeostasis. Knowledge of their distribution in humans is sparse and it is unknown whether alterations occur in type 2 diabetes. We aimed to evaluate the distribution of enteroendocrine K and L cells and relevant prohormone-processing enzymes (using immunohistochemical staining), and to evaluate the mRNA expression of the corresponding genes along the entire intestinal tract in individuals with type 2 diabetes and healthy participants. Methods In this cross-sectional study, 12 individuals with type 2 diabetes and 12 age-and BMI-matched healthy individuals underwent upper and lower double-balloon enteroscopy with mucosal biopsy retrieval from approximately every 30 cm of the small intestine and from seven specific anatomical locations in the large intestine. Results Significantly different densities for cells positive for chromogranin A (CgA), glucagon-like peptide-1, glucosedependent insulinotropic polypeptide, peptide YY, prohormone convertase (PC) 1/3 and PC2 were observed along the intestinal tract. The expression of CHGA did not vary along the intestinal tract, but the mRNA expression of GCG, GIP, PYY, PCSK1 and PCSK2 differed along the intestinal tract. Lower counts of CgA-positive and PC1/3-positive cells, respectively, were observed in the small intestine of individuals with type 2 diabetes compared with healthy participants. In individuals with type 2 diabetes compared with healthy participants, the expression of GCG and PYY was greater in the colon, while the expression of GIP and PCSK1 was greater in the small intestine and colon, and the expression of PCSK2 was greater in the small intestine. Conclusions/interpretation Our findings provide a detailed description of the distribution of enteroendocrine K and L cells and the expression of their products in the human intestinal tract and demonstrate significant differences between individuals with type 2 diabetes and healthy participants.Electronic supplementary material The online version of this article (https://doi.org/10.1007/s00125-017-4450-9) contains peer-reviewed but unedited supplementary material, which is available to authorised users.