Immunotherapy has proven to be a boon for patients grappling with metastatic melanoma, significantly enhancing their clinical condition and overall quality of life. A compelling connection was discovered between the composition of the intestinal microbiome and the effectiveness of immunotherapy substantiated in both animal models and human patients. Nonetheless, the precise biological mechanisms through which gut microbes influence melanoma treatment outcomes remain poorly understood. This study conducted a high-resolution metagenomic meta-analysis, employing cutting-edge bioinformatics techniques including genome-resolved metagenomics, strain profiling, comparative genomics, and metabolic reconstruction. According to the obtained results, the systemic metabolic depletion of the gut microbiome causes a lack of response to immunotherapy. Specifically, the presence of bacteria adept at utilizing polysaccharides, as well as those responsible for cobalamin, amino acids, and fatty acids production, decreased in patients who experienced unfavorable treatment outcomes. In contrast, patients who had successful outcomes after immunotherapy exhibited a prevalence of amino acids and cobalamin prototrophs, while autotrophy in these substances characterized the microbiomes of patients with unsuccessful outcomes. The metabolic reconstruction of short-chain fatty acid biosynthesis pathways did not differentiate bacteria linked to treatment outcomes based on their ability to produce acetate, butyrate, or propionate. However, the cobalamin-dependent Wood-Ljungdahl pathway of acetate synthesis was directly associated with immunotherapy effectiveness.