We have previously described the existence of membranous nanotubes, bridging adjacent bacteria, facilitating intercellular trafficking of nutrients, cytoplasmic proteins, and even plasmids, yet components enabling their biogenesis remain elusive. Here we reveal the identity of a molecular apparatus providing a platform for nanotube biogenesis. Using Bacillus subtilis (Bs), we demonstrate that conserved components of the flagellar export apparatus (FliO, FliP, FliQ, FliR, FlhB, and FlhA), designated CORE, dually serve for flagellum and nanotube assembly. Mutants lacking CORE genes, but not other flagellar components, are deficient in both nanotube production and the associated intercellular molecular trafficking. In accord, CORE components are located at sites of nanotube emergence. Deleting COREs of distinct species established that CORE-mediated nanotube formation is widespread. Furthermore, exogenous COREs from diverse species could restore nanotube generation and functionality in Bs lacking endogenous CORE. Our results demonstrate that the CORE-derived nanotube is a ubiquitous organelle that facilitates intercellular molecular trade across the bacterial kingdom.