This study aimed to investigate the in vivo antidiarrheal efficacy of methanolic extract of Portulaca oleracea against diarrhea induced by Escherichia coli in male rats. The initial phase involved the extraction of P. oleracea using 99.8% absolute methanol through a Soxhlet extraction apparatus. Phytochemical analyses of the extract unveiled the presence of alkaloids, flavonoids, steroids, carbohydrates, tannins, and proteins. In the experimental phase, 20 Wistar albino male rats (Rattus norvegicus) were divided into four groups: the Negative Control (uninfected and untreated); the Positive Control (infected but untreated); POE group consisted of rats infected with E. coli (1×109 CFU/mL) and subsequently treated with 200 mg/kg BW of P. oleracea methanolic extract orally twice daily for seven days; and CIP group included rats infected and treated with 7.14 mg/kg BW of ciprofloxacin orally twice daily for seven days. Outcome measures encompassed clinical signs, frequency of watery stools, rectal bacterial count, and changes in BW. Remarkably, both POE and CIP groups demonstrated a statistically significant reduction in the frequency of watery stools (P<0.05) and a significant increase in BW (P<0.05) compared to Positive Control group. Notably, there was no significant difference in these parameters between POE and CIP groups, suggesting that P. oleracea methanolic extract performs comparably to ciprofloxacin in treating E. coli-induced diarrhea. The findings illuminate the potential of herbal medications such as P. oleracea as effective alternatives to antibiotics, thereby mitigating the overuse of antibiotics and the associated risk of bacterial resistance.