We present a robust microfluidic platform for the stable generation of multiple chemical gradients simultaneously using in situ self-assembly of particles in microchannels. This proposed device enables us to generate stable and reproducible diffusion-based gradients rapidly without convection flow: gradients are stabilized within 5 min and are maintained steady for several hours. Using this device, we demonstrate the dynamic position control of bacteria by introducing the sequential directional change of chemical gradients. Green Fluorescent Protein (GFP)-expressing bacterial cells, allowing quantitative monitoring, show not only tracking motion according to the directional control of chemical gradients, but also the gradual loss of sensitivity when exposed to the sequential attractants because of receptor saturation. In addition, the proposed system can be used to study the preferential chemotaxis assay of bacteria toward multiple chemical sources, since it is possible to produce multiple chemical gradients in the main chamber; aspartate induces the most preferential chemotaxis over galactose and ribose. The microfluidic device can be easily fabricated with a simple and cost effective process based on capillary pressure and evaporation for particle assembly. The assembled particles create uniform porous membranes in microchannels and its porosity can be easily controlled with different size particles. Moreover, the membrane is biocompatible and more robust than hydrogel-based porous membranes. The proposed system is expected to be a useful tool for the characterization of bacterial responses to various chemical sources, screening of bacterial cells, synthetic biology and understanding many cellular activities.