Eluxadoline (ELD), a recently approved drug, exhibits potential therapeutic effects in the management and treatment of IBS-D. However, its applications have been limited due to poor aqueous solubility, leading to a low dissolution rate and oral bioavailability. The current study’s goals are to prepare ELD-loaded eudragit (EG) nanoparticles (ENPs) and to investigate the anti-diarrheal activity on rats. The prepared ELD-loaded EG-NPs (ENP1-ENP14) were optimized with the help of Box–Behnken Design Expert software. The developed formulation (ENP2) was optimized based on the particle size (286 ± 3.67 nm), PDI (0.263 ± 0.01), and zeta potential (31.8 ± 3.18 mV). The optimized formulation (ENP2) exhibited a sustained release behavior with maximum drug release and followed the Higuchi model. The chronic restraint stress (CRS) was successfully used to develop the IBS-D rat model, which led to increased defecation frequency. The in vivo studies revealed a significant reduction in defecation frequency and disease activity index by ENP2 compared with pure ELD. Thus, the results demonstrated that the developed eudragit-based polymeric nanoparticles can act as a potential approach for the effective delivery of eluxadoline through oral administration for irritable bowel syndrome diarrhea treatment.