A pharmaceutical composition for treating diabetes and preparation methods, quality control methods and uses thereof, said pharmaceutical composition is prepared by using silkworm shit and licorice as raw materials, it not only can reduce blood sugar, but also can improve flatulence.