A key challenge for the effective treatment of gastrointestinal diseases including inflammatory bowel disease is to develop an orally administered drug delivery system capable of prolonged retention in the gastrointestinal tract. Herein we report a bioadhesive liquid coacervate based on hydrogen bonding-driven nanoparticle assembly. Free from electrostatic interactions, our fluid nanoparticle-assembled coacervate demonstrates significant pH- and salt-independent structural stability and forms a physically adhesive coating on a large surface area of intestinal tract with an extended residence time of more than 2 days to mediate the sustained release of preloaded water-soluble small molecule drugs in vivo. The orally administered drug-laden nanoparticle-assembled coacervate significantly mitigates the symptoms of inflammatory bowel disease, restores the diversity of gut microbiota, reduces systemic drug exposure, and improves the therapeutic efficacy in a rat acute colitis model compared with the oral administration of the same amount of drug in solution form. We suggest that the nanoparticle-assembled coacervate provides a promising drug delivery platform for management and treatment of numerous gastrointestinal diseases where controlled drug release with extended residence time is desired.