Vertebrates harbor abundant lipopolysaccharide (LPS) in their gut microbiota. Alkaline phosphatases can dephosphorylate and detoxify the endotoxin component of LPS. Here, we show that expression of the zebrafish intestinal alkaline phosphatase (Iap), localized to the intestinal lumen brush border, is induced during establishment of the gut microbiota. Iap-deficient zebrafish are hypersensitive to LPS toxicity and exhibit the excessive intestinal neutrophil influx characteristic of wild-type zebrafish exposed to LPS. Both of these Iap mutant phenotypes are dependent on Myd88 and Tumor Necrosis Factor Receptor (Tnfr), proteins also involved in LPS sensitivity in mammals. When reared germ-free, the intestines of Iap-deficient zebrafish are devoid of neutrophils. Together, these findings demonstrate that the endogenous microbiota establish the normal homeostatic level of neutrophils in the zebrafish intestine through a process involving Iap, Myd88, and Tnfr. Thus, by preventing inflammatory responses, Iap plays a crucial role in promoting mucosal tolerance to resident gut bacteria.