Disruption of colonic homeostasis caused by aberrant M1/M2 macrophage polarization and dysbiosis contributes to inflammatory bowel disease (IBD) pathogenesis. However, the molecular factors mediating colonic homeostasis are not well characterized. Here, we found that Ninjurin1 (Ninj1) limits colon inflammation by regulating macrophage polarization and microbiota composition under homeostatic conditions and during colitis development. Ninj1 deletion in mice induced hypersusceptibility to colitis, with increased prevalence of colitogenic Prevotellaceae strains and decreased immunoregulatory Lachnospiraceae strains. Upon co‐housing (CoH) with WT mice, Ninj1−/− mice showed increased Lachnospiraceae and decreased Prevotellaceae abundance, with subsequent improvement of colitis. Under homeostatic conditions, M1 macrophage frequency was higher in the Ninj1−/− mouse colons than wild‐type (WT) mouse colons, which may contribute to increased basal colonic inflammation and microbial imbalance. Following colitis induction, Ninj1 expression was increased in macrophages; meanwhile Ninj1−/− mice showed severe colitis development and impaired recovery, associated with decreased M2 macrophages and escalated microbial imbalance. In vitro, Ninj1 knockdown in mouse and human macrophages activated M1 polarization and restricted M2 polarization. Finally, the transfer of WT macrophages ameliorated severe colitis in Ninj1−/− mice. These findings suggest that Ninj1 mediates colonic homeostasis by modulating M1/M2 macrophage balance and preventing extensive dysbiosis, with implications for IBD prevention and therapy.