Intestinal enterochromaffin (EC) cell hyperplasia and increased 5-hydroxytryptamine (5-HT) availability play key roles in the pathogenesis of abdominal hypersensitivity of irritable bowel syndrome (IBS). This study aims to study the effect of quercetin on visceral pain and 5-HT availability in postinflammatory IBS (PI-IBS) rats. PI-IBS model rats were administered quercetin by gavage at doses of 5, 10, and 20 mg/kg for 14 days. Compared with normal rats, the visceral pain threshold of PI-IBS rats was markedly decreased and the abdominal motor response to colon distension was markedly increased. The EC cell count and 5-HT level, as well as tryptophan hydroxylase (TPH) protein, were all significantly elevated in PI-IBS rats, while the 5-HT reuptake transporter (serotonin transporter) was reduced. Genes that are responsible for enteroendocrine cell differentiation, that is, Ngn3 and pdx1, were significantly increased in the PI-IBS group. Quercetin treatment markedly elevated the pain threshold pressure and decreased the visceral motor response of PI-IBS animals; and EC cell density and 5-HT level, as well as TPH expression, in the PI-IBS group were all reduced by quercetin. Quercetin treatment also significantly reduced colonic expression of Ngn3 and pdx1 of PI-IBS. Findings from the present study indicated that the analgesic effect of quercetin on PI-IBS may result from reduction of 5-HT availability in the colon, and the regulatory role of quercetin in endocrine progenitors may contribute to reduced EC cells.