Deficiency in X-linked inhibitor of apoptosis protein (XIAP) is the cause for X-linked lymphoproliferative syndrome 2 (XLP2). About one-third of these patients suffer from severe and therapy-refractory inflammatory bowel disease (IBD), but the exact cause of this pathogenesis remains undefined. Here, we used XIAP-deficient mice to characterize the mechanisms underlying intestinal inflammation. In Xiap−/− mice, we observed spontaneous terminal ileitis and microbial dysbiosis characterized by a reduction of Clostridia species. We showed that in inflamed mice, both TNF receptor 1 and 2 (TNFR1/2) cooperated in promoting ileitis by targeting TLR5-expressing Paneth cells (PCs) or dendritic cells (DCs). Using intestinal organoids and in vivo modeling, we demonstrated that TLR5 signaling triggered TNF production, which induced PC dysfunction mediated by TNFR1. TNFR2 acted upon lamina propria immune cells. scRNA-seq identified a DC population expressing TLR5, in which Tnfr2 expression was also elevated. Thus, the combined activity of TLR5 and TNFR2 signaling may be responsible for DC loss in lamina propria of Xiap−/− mice. Consequently, both Tnfr1−/−Xiap−/− and Tnfr2−/−Xiap−/− mice were rescued from dysbiosis and intestinal inflammation. Furthermore, RNA-seq of ileal crypts revealed that in inflamed Xiap−/− mice, TLR5 signaling was abrogated, linking aberrant TNF responses with the development of a dysbiosis. Evidence for TNFR2 signaling driving intestinal inflammation was detected in XLP2 patient samples. Together, these data point toward a key role of XIAP in mediating resilience of TLR5-expressing PCs and intestinal DCs, allowing them to maintain tissue integrity and microbiota homeostasis.