Collaboration between cancer treatment and inflammation management has emerged as an integral facet of comprehensive cancer care. Nevertheless, the development of interventions concurrently targeting both inflammation and cancer has encountered significant challenges stemming from various external factors. Herein, a bioactive agent synthesized by genetically engineering melanin-producing Bacillus thuringiensis (B. thuringiensis) bacteria, simultaneously achieves eco-friendly photothermal agent and efficient reactive oxygen/nitrogen species (RONS) scavenger benefits, perfectly tackling present toughies from inflammation to cancer therapies. The biologically derived melanin exhibits exceptional photothermal-conversion performance, facilitating potent photonic hyperthermia that effectively eradicates tumor cells and tissues, thereby impeding tumor growth. Additionally, the RONS-scavenging properties of melanin produced by B. thuringiensis bacteria contribute to inflammation reduction, augmenting the efficacy of photothermal tumor repression. This study presents a representative paradigm of genetic engineering in B. thuringiensis bacteria to produce functional agents tailored for diverse biomedical applications, encompassing inflammation and cancer therapy.