Rectal prolapse in serious inflammatory bowel disease is caused by abnormal reactions of the intestinal mucosal immune system. The circadian clock has been implicated in immune defense and inflammatory responses, but the mechanisms by which it regulates gut inflammation remain unclear. In this study, we investigate the role of the rhythmic gene Period2 (Per2) in triggering inflammation in the rectum and its contribution to the pathogenesis of rectal prolapse. We report that Per2 deficiency in mice increased susceptibility to intestinal inflammation and resulted in spontaneous rectal prolapse. We further demonstrated that PER2 was essential for the transcription of glycogen synthase 1 by interacting with the NF-κB p65. We show that the inhibition of Per2 reduced the levels of glycogen synthase 1 and glycogen synthesis in macrophages, impairing the capacity of pathogen clearance and disrupting the composition of gut microbes. Taken together, our findings identify a novel role for Per2 in regulating the capacity of pathogen clearance in macrophages and gut inflammation and suggest a potential animal model that more closely resembles human rectal prolapse.