The degradation of heme and the interplay of its catabolic derivative, bilirubin, between humans and their gut microbiota is an essential facet of human health. However, the hypothesized bacterial enzyme that reduces bilirubin to urobilinogen, a key step that produces the excretable waste products of this pathway, has remained unidentified. In this study, we used a combination of biochemical analyses and comparative genomics to identify a novel enzyme, BilR, that can reduce bilirubin to urobilinogen. We delineated the BilR sequences from other members of the Old Yellow Enzyme family through the identification of key residues in the active site that are critical for bilirubin reduction and found that BilR is predominantly encoded by Firmicutes in the gut microbiome. Our analysis of human gut metagenomes showed that BilR is a common feature of a healthy adult human microbiome but has a decreased prevalence in neonates and IBD patients. This discovery sheds new light on the role of the gut microbiome in bilirubin metabolism and highlights the significance of the gut-liver axis in maintaining bilirubin homeostasis.