Nicotinamide adenine dinucleotide (NAD), a cofactor for hundreds of metabolic reactions in all cell types, plays an essential role in diverse cellular processes including metabolism, DNA repair, and aging. NAD metabolism is critical to maintain cellular homeostasis in response to the environment, and disruption of this homeostasis is associated with decreased cellular NAD levels in aging. Conversely, elevated NAD synthesis is required to sustain the increased metabolic rate of cancer cells. Consequently, therapeutic strategies aimed to both upregulate NAD (i.e. NAD-boosting nutriceuticals) or downregulate NAD (inhibitors of key NAD synthesis enzymes) are being actively investigated. However, how this essential metabolic pathway is impacted by the environment remains unclear. Here, we report an unexpected trans-kingdom cooperation between bacteria and mammalian cells wherein bacteria contribute to host NAD biosynthesis. Bacteria confer cancer cells with the resistance to inhibitors of NAMPT, the rate-limiting enzyme in the main vertebrate NAD salvage pathway. Mechanistically, a microbial nicotinamidase (PncA) that converts nicotinamide to nicotinic acid, a key precursor in the alternative deamidated NAD salvage pathway, is necessary and sufficient for this protective effect. This bacteria-enabled resistance mechanism that allows the mammalian host to bypass the drug-induced metabolic block represents a novel paradigm in drug resistance. This host-microbe metabolic interaction also enables bacteria to dramatically enhance the NAD-boosting efficiency of nicotinamide supplementation in vitro and in vivo, demonstrating a crucial role of microbes, gut microbiota in particular, in organismal NAD metabolism.