Rap1-GTP is necessary for leukocyte function-associated antigen-1 (LFA-1)-dependent arrest of naïve T cells on the high endothelial venule (HEV). Here we show that Rap1-GDP restrains rolling behaviours of T cells on the peripheral lymph node addressin by inhibiting tether formation. Consequently, Rap1 deficiency impairs homing of naive T cells to peripheral lymph nodes, which induces the differentiation of CD4+ T cells into Th17 cells in microbiota-dependent manner. On the other hand, Rap1 deficiency accelerates alpha4beta7-dependent homing of effector T cells such as Th17 and Th1 cells to the colon, resulting in spontaneous colitis with tumours. Rap1-GDP associates with and activates lymphocyte-oriented kinase, which phosphorylates ERM (ezrin, radixin and moesin) in resting T cells. Phosphomimetic ezrin reduces the rolling of Rap1-deficient cells, and thereby decreases their homing into the colon. On the other hand, chemokines activate Rap1 at the plasma membrane within seconds, and Rap1-GTP binds to filamins, which diminishes its association with the b2 chain of LFA-1 and results in LFA-1 activation. This Rap1-dependent regulation of T-cell circulation prevents the maturation of pathogenic Th17 cells in mesenteric lymph nodes and their trafficking into colon lamina propria, which are major contributing factors to the pathogenesis of colitis.