This study aimed to investigate the protective effect of Herba Origani, the dried whole herb of Origanum vulgare L., on dextran sodium sulfate (DSS)-induced ulcerative colitis in mice and explore its mechanisms of action through analyzing the intestinal microbiota in cecum contents and metabolites in colonic tissues. HOEP alleviated colitis symptoms, colonic inflammation and pathological injury as well as repaired intestinal barrier function in DSS-induced UC mice. The intestinal microbiota analysis showed that HOEP restored the gut microbiota dysbiosis in DSS-treated mice by increasing the alpha diversity of the intestinal microbiota, increasing the abundance of the Bacteroidota community and adjusting short-chain fatty acids (SCFAs), which maintain mucosal immunity and intestinal barrier. Metabolomic analysis revealed that HOEP promoted bile acids absorption and regulated bile acids metabolism in the intestine, thereby maintaining intestinal mucosal immune homeostasis. In addition, HOEP might also regulate the intestinal immune system through the phosphatidylinositol signaling system. These findings suggested that HOEP exerted promising protection against DSS-induced ulcerative mice through remolding gut microbiota to regulate bile acid and SCFA metabolism, and that HOEP have a potential to be utilized for the treatment of inflammatory intestinal diseases.