Collectively, our findings define the GlcNAc-6-O-sulfation of mucin O-glycans as a critical regulatory factor for maintaining gut microbiota and host immune systems that prevent obesity and intestinal inflammation. The gene discussed is MUC5AC; the disease is obesity due to melanocortin 4 receptor deficiency.