The management of acute pancreatitis (AP) remains a challenge to clinicians worldwide for limited effective interventions. Retinoid orphan receptor gamma t (RORγt) is a therapeutic target for several diseases; however, it is unclear whether inhibiting RORγt can ameliorate AP. The relative expression of RORγt, IL‐17 and IL‐23 in the peripheral blood mononuclear cells of AP patients was measured by RT‐PCR. An AP mouse model was induced by ceruletide, and SR1001 was injected before ceruletide administration. RORγt+ cells, T helper 17 cells (Th17), regulatory T cells (Tregs) and γδ T cells were assessed in the pancreas and spleen by flow cytometry. Higher RORγt expression in patients indicated the potential role of RORγt in AP progression. Analyses of the IL‐17/IL‐23 axis confirmed its role. SR1001 significantly alleviated AP histologically in the mouse model. Serum levels of amylase, IL‐6, TNFalpha, IL‐17 and IL‐23 decreased upon SR1001 treatment. SR1001 selectively decreased the number of RORγt+, Th17, Tregs and γδ T cells in the pancreas but not the spleen. Collectively, these results showed that SR1001 exerted therapeutic effects on AP by suppressing IL‐17‐secreting Th17 and γδ T cells in the pancreas. Thus, SR1001 may be a promising drug for the treatment of AP in the clinic.