Irritable bowel syndrome (IBS) is a heterogenic, functional gastrointestinal disorder of the gut-brain axis characterized by altered bowel habit and abdominal pain. Preclinical and clinical results suggested that, in part of these patients, pain may result from fungal induced release of mast cell derived histamine, subsequent activation of sensory afferent expressed histamine-1 receptors and related sensitization of the nociceptive transient reporter potential channel V1 (TRPV1)-ion channel. TRPV1 gating properties are regulated in lipid rafts. Miltefosine, an approved drug for the treatment of visceral Leishmaniasis, has fungicidal effects and is a known lipid raft modulator. We anticipated that miltefosine may act on different mechanistic levels of fungal-induced abdominal pain and may be repurposed to IBS. In the IBS-like rat model of maternal separation we assessed the visceromotor response to colonic distension as indirect readout for abdominal pain. Miltefosine reversed post-stress hypersensitivity to distension (i.e. visceral hypersensitivity) and this was associated with differences in the fungal microbiome (i.e. mycobiome). In vitro investigations confirmed fungicidal effects of miltefosine. In addition, miltefosine reduced the effect of TRPV1 activation in TRPV1-transfected cells and prevented TRPV1-dependent visceral hypersensitivity induced by intracolonic-capsaicin in rat. Miltefosine may be an attractive drug to treat abdominal pain in IBS.