Bacterial flagellar motor is a highly ordered and complex supramolecular structure that powers rotation of flagella and serves as a type III export apparatus for flagellar assembly. Motor biogenesis represents a formidable example of self-assembly, but little is known about early steps of the motor structure formation. Here we used a combination of fluorescence microscopy techniques to dissect the order of the motor assembly in Escherichia coli cells, to map in vivo the underlying protein interactions and to investigate dynamics of protein exchange in the assembled motor structure. Our data suggest that motor self-assembly is initiated by oligomerization of the membrane export apparatus protein FlhA, which is followed by the recruitment of the MS ring component FliF and by the ordered association of other motor proteins. The assembly process combines the hierarchy with cooperativity, whereby the association of each subsequent motor structure stabilizes the growing assembly. Our results provide a novel and so far the most complete view of the early steps in flagellar motor assembly and improve understanding of the motor structure and regulation.