Phosphoinositides are a minor class of short-lived membrane phospholipids that serve crucial functions in cell physiology ranging from cell signalling and motility to their role as signposts of compartmental membrane identity. Phosphoinositide 4-phosphates such as phosphatidylinositol 4-phosphate (PI(4)P) and phosphatidylinositol 4,5-bisphosphate (PI(4,5)P2) are concentrated at the plasma membrane, on secretory organelles, and on lysosomes, whereas phosphoinositide 3-phosphates, most notably phosphatidylinositol 3-phosphate (PI(3)P), are a hallmark of the endosomal system. Directional membrane traffic between endosomal and secretory compartments, although inherently complex, therefore requires regulated phosphoinositide conversion. The molecular mechanism underlying this conversion of phosphoinositide identity during cargo exit from endosomes by exocytosis is unknown. Here we report that surface delivery of endosomal cargo requires hydrolysis of PI(3)P by the phosphatidylinositol 3-phosphatase MTM1, an enzyme whose loss of function leads to X-linked centronuclear myopathy (also called myotubular myopathy) in humans. Removal of endosomal PI(3)P by MTM1 is accompanied by phosphatidylinositol 4-kinase-2α (PI4K2α)-dependent generation of PI(4)P and recruitment of the exocyst tethering complex to enable membrane fusion. Our data establish a mechanism for phosphoinositide conversion from PI(3)P to PI(4)P at endosomes en route to the plasma membrane and suggest that defective phosphoinositide conversion at endosomes underlies X-linked centronuclear myopathy caused by mutation of MTM1 in humans.