Synthetic microbial consortia are a rapidly growing area of synthetic biology. So far, most consortia are designed without considering their environments; however, in nature, microbial interactions are constantly modulated by cellular contexts, which, in principle, can dramatically alter community behaviors. Here we present the construction, validation, and characterization of an engineered bacterial predator-prey consortium that involves a chloramphenicol (CM)-mediated, context-dependent cellular interaction. We show that varying the CM level in the environment can induce success in the ecosystem with distinct patterns from predator dominance to prey-predator crossover to ecosystem collapse. A mathematical model successfully captures the essential dynamics of the experimentally observed patterns. We also illustrate that such a dependence enriches community dynamics under different initial conditions and further test the resistance of the consortium to invasion with engineered bacterial strains. This work exemplifies the role of the context dependence of microbial interactions in modulating ecosystem dynamics, underscoring the importance of including contexts into the design of engineered ecosystems for synthetic biology applications.