Targeting the acidified inflammatory microenvironment with pH-sensitive opioids is a novel approach for managing visceral pain while mitigating side effects. The analgesic efficacy of pH-dependent opioids has not been studied during the evolution of inflammation, where fluctuating tissue pH and repeated therapeutic dosing could influence analgesia and side effects. Whether pH-dependent opioids can inhibit human nociceptors during extracellular acidification is unexplored. We studied the analgesic efficacy and side-effect profile of a pH-sensitive fentanyl analog, (±)-N-(3-fluoro-1-phenethylpiperidine-4-yl)-N-phenyl propionamide (NFEPP), during the evolution of colitis induced in mice with dextran sulphate sodium. Colitis was characterized by granulocyte infiltration, histological damage, and acidification of the mucosa and submucosa at sites of immune cell infiltration. Changes in nociception were determined by measuring visceromotor responses to noxious colorectal distension in conscious mice. Repeated doses of NFEPP inhibited nociception throughout the course of disease, with maximal efficacy at the peak of inflammation. Fentanyl was antinociceptive regardless of the stage of inflammation. Fentanyl inhibited gastrointestinal transit, blocked defaecation, and induced hypoxemia, whereas NFEPP had no such side effects. In proof-of-principle experiments, NFEPP inhibited mechanically provoked activation of human colonic nociceptors under acidic conditions mimicking the inflamed state. Thus, NFEPP provides analgesia throughout the evolution of colitis with maximal activity at peak inflammation. The actions of NFEPP are restricted to acidified layers of the colon, without common side effects in normal tissues. N-(3-fluoro-1-phenethylpiperidine-4-yl)-N-phenyl propionamide could provide safe and effective analgesia during acute colitis, such as flares of ulcerative colitis.