Fluidic self-assembly is a promising pathway for parallel fabrication of devices made up of many small components. Here, we introduce 'railed microfluidics' as an agile method to guide and assemble microstructures inside fluidic channels. The guided movement of microstructures in microfluidic channels was achieved by fabricating grooves ('rails') on the top surface of the channels and also creating complementary polymeric microstructures that fit with the grooves. Using the rails as a guiding mechanism, we built complex one- and two-dimensional microsystems in which all the microstructures initially involved in the fabrication method were incorporated as components in the final product. Complex structures composed of more than 50 microstructures (each sized smaller than 50 microm) were fluidically self-assembled with zero error. Furthermore, we were able to use the rails to guide microstructures through different fluid solutions, successfully overcoming strong interfacial tension between solutions. On the basis of rail-guided self-assembly and cross-solution movement, we demonstrated heterogeneous fluidic self-assembly of polymeric microstructures and living cells. In addition to such assembly of in situ polymerized structures, we also guided and assembled externally fabricated silicon chips-demonstrating the feasible application of railed microfluidics to other materials systems.