Translocating proteins across the double membrane of Gram-negative bacteria, type III secretion systems (T3SS) occur in two evolutionarily related forms: injectisomes, delivering virulence factors into host cells, and the flagellar system, secreting the polymeric filament used for motility. While both systems share related elements of a cytoplasmic sorting platform that facilitates the hierarchical secretion of protein substrates, its assembly and regulation remain unclear. Here we describe a module mediating the assembly of the sorting platform in both secretion systems, and elucidate the structural basis for segregation of homologous components among these divergent T3SS subtypes sharing a common cytoplasmic milieu. These results provide a foundation for the subtype-specific assembly of T3SS sorting platforms and will support further mechanistic analysis and anti-virulence drug design.