We have constructed a linear array of coupled, microscale patches of habitat. When bacteria are inoculated into this habitat landscape, a metapopulation emerges. Local bacterial populations in each patch coexist and weakly couple with neighbor populations in nearby patches. These spatially distributed bacterial populations interact through local extinction and colonization processes. We have further built heterogeneous habitat landscapes to study the adaptive dynamics of the bacterial metapopulations. By patterning habitat differences across the landscape, our device physically implements an adaptive landscape. In landscapes with higher niche diversity, we observe rapid adaptation to large-scale, low-quality (high-stress) areas. Our results illustrate the potential lying at the interface between nanoscale biophysics and landscape evolutionary ecology.