This Review synthesizes the current understanding of host–microbiota dynamics in patients with cancer and proposes to integrate microbiota management approaches guided by ecological principles in cancer care. Mathematical ecology could help to predict the risk of microbiota-related complications and guide treatment choices that minimize disturbance to microbial ecosystems, ultimately informing microbiota-targeted interventions that could improve responses to cancer treatments.