This study demonstrates a versatile and fast method for patterning three-dimensional (3D) monolithic microstructures made of multiple (up to 24 demonstrated) types of materials, all spatially aligned, inside a microchannel. This technique uses confocal scanning or conventional fluorescence microscopy to polymerize selected regions of a photocurable material, and microfluidics to automate the delivery of a series of washes and photocurable reagents. Upon completion of lithographic cycles, the aligned 3D microstructures are suitable for microfluidic manipulation and analysis. We demonstrated the fabrication of composite 3D microstructures with various geometries, size scales (up to 1 mm2), spatial resolution (down to 3 microm), and materials. For a typical multi-cycle process, the total fabrication time was tens of minutes, compared to tens of hours for conventional methods. In the case of 3D hydrogels, a potential use is the direct patterning of inhomogeneous 3D microenvironments for studying cell behavior.