Ulcerative colitis (UC), a kind of inflammatory bowel disease, is generally characterized by chronic, persistent, relapsing, and nonspecific ulceration of the bowel, which is widespread in the world. Although the pathogenesis of UC is multifactorial, growing evidence has demonstrated that gut microbiota and its metabolites are closely related to the development of UC. Lizhong decoction (LZD), a well-known classical Chinese herbal prescription, has been used to clinically treat UC for long time, but its mechanism is not clear. In this study, 16S rRNA gene sequencing combining with untargeted metabolomics profiling was used to investigate how LZD worked. Results indicated that LZD could shape the gut microbiota structure and modify metabolic profiles. The abundance of opportunistic pathogens such as Clostridium sensu stricto 1, Enterobacter, and Escherichia-Shigella correlated with intestinal inflammation markedly decreased, while the levels of beneficial bacteria including Blautia, Muribaculaceae_norank, Prevotellaceae UCG-001, and Ruminiclostridium 9 elevated in various degrees. Additionally, fecal metabolite profiles reflecting microbial activities showed that adenosine, lysoPC(18:0), glycocholic acid, and deoxycholic acid notably decreased, while cholic acid, α-linolenic acid, stearidonic acid, and L-tryptophan significantly increased after LZD treatment. Hence, based on the systematic analysis of 16S rRNA gene sequencing and metabolomics of gut flora, the results provided a novel insight that microbiota and its metabolites might be potential targets for revealing the mechanism of LZD on amelioration of UC.Key Points • The potential mechanism of LZD on the amelioration of UC was firstly investigated.• LZD could significantly shape the structure of gut microbiota.• LZD could notably modulate the fecal metabolic profiling of UC mice. Graphical abstract.