Pharmaceutical composition and formula thereof for prevention and treatment of flatulence and diarrhea in rabbits comprise 1-5 parts by weight of Rhizoma atractylodis, 1-5 parts by weight of cypress fruit, 0.5-2 parts by weight of fried radish seed, 1-3 parts by weight of Angelica dahurica, 1-3 parts by weight of Herba schizonepetae, 3-5 parts by weight of herb of shiny cinquefoil, and 1-2 parts by weight of grassleaf sweetflag rhizome. A pharmaceutical formula, wherein the active ingredients thereof are the aforementioned pharmaceutical composition. The present invention can prevent and treat the flatulence and diarrhea in rabbits effectively, induce resuscitation, and promote digestion to eliminate food stagnation. The present invention is low in costs and has significant therapeutic effect, with the cure rate of flatulence and diarrhea in rabbits being higher than 95%.