Directional transport of liquids is of great importance in energy saving, chemical/biomedical engineering, and microfluidics applications. Despite considerable progress in engineering different open surfaces to achieve liquid manipulation, the realization of diode-like liquid transport in enclosed spaces is still challenging. Here, a flexible diode microtube is presented for directional liquid transport within confined spaces using pulsed microfluidics. The microtubes exhibit sophisticated microstructures on the inner wall, replicated from a precisely controlled flow configuration in the microfluidic channel. Under the effect of asymmetric pinning and unbalanced Laplace pressure, such microtubes enable directional liquid transport in closed channels. More importantly, by integrating in situ flow lithography with the microfluidic system, segmented liquid diodes are fabricated as assembly units for the construction of fluidic–electronic circuits that perform logic operations. These results demonstrate the capacity of the present liquid-diode microtubes for flexible, directional, and programmable liquid transport. We believe that it can open an avenue for designing advanced fluidic circuit-based devices toward versatile practical applications.