Bacteria were first detected in human tumors more than 100 years ago, but the characterization of the tumor microbiome has remained challenging because of its low biomass. We undertook a comprehensive analysis of the tumor microbiome, studying 1526 tumors and their adjacent normal tissues across seven cancer types, including breast, lung, ovary, pancreas, melanoma, bone, and brain tumors. We found that each tumor type has a distinct microbiome composition and that breast cancer has a particularly rich and diverse microbiome. The intratumor bacteria are mostly intracellular and are present in both cancer and immune cells. We also noted correlations between intratumor bacteria or their predicted functions with tumor types and subtypes, patients' smoking status, and the response to immunotherapy.