Critically ill patients admitted to the medical intensive care unit (MICU) have reduced intestinal microbiota diversity and altered microbiome-associated metabolite concentrations. Metabolites produced by the gut microbiota have been associated with survival of patients receiving complex medical treatments and thus might represent a treatable trait to improve clinical outcomes. We prospectively collected fecal specimens, defined microbiome compositions by shotgun metagenomic sequencing, and quantified microbiota-derived fecal metabolites by mass spectrometry from 196 critically ill patients admitted to the MICU for non-COVID-19 respiratory failure or shock to correlate microbiota features and metabolites with 30-day mortality. Microbiota compositions of the first fecal sample after MICU admission did not independently associate with 30-day mortality. We developed a metabolic dysbiosis score (MDS) that uses fecal concentrations of 13 microbiota-derived metabolites, which predicted 30-day mortality independent of known confounders. The MDS complements existing tools to identify patients at high risk of mortality by incorporating potentially modifiable, microbiome-related, independent contributors to host resilience.