DNA looping mediated by transcription factors plays critical roles in prokaryotic gene regulation. The "genetic switch" of bacteriophage λ determines whether a prophage stays incorporated in the E. coli chromosome or enters the lytic cycle of phage propagation and cell lysis. Past studies have shown that long-range DNA interactions between the operator sequences O(R) and O(L) (separated by 2.3 kb), mediated by the λ repressor CI (accession number P03034), play key roles in regulating the λ switch. In vitro, it was demonstrated that DNA segments harboring the operator sequences formed loops in the presence of CI, but CI-mediated DNA looping has not been directly visualized in vivo, hindering a deep understanding of the corresponding dynamics in realistic cellular environments. We report a high-resolution, single-molecule imaging method to probe CI-mediated DNA looping in live E. coli cells. We labeled two DNA loci with differently colored fluorescent fusion proteins and tracked their separations in real time with ∼40 nm accuracy, enabling the first direct analysis of transcription-factor-mediated DNA looping in live cells. Combining looping measurements with measurements of CI expression levels in different operator mutants, we show quantitatively that DNA looping activates transcription and enhances repression. Further, we estimated the upper bound of the rate of conformational change from the unlooped to the looped state, and discuss how chromosome compaction may impact looping kinetics. Our results provide insights into transcription-factor-mediated DNA looping in a variety of operator and CI mutant backgrounds in vivo, and our methodology can be applied to a broad range of questions regarding chromosome conformations in prokaryotes and higher organisms.