A pharmaceutical composition for treating diabetes is provided in this invention. The composition contains a lanostane compound as a potent component. A suitable source of the lanostane compound is a Poria extract from metabolite, sclerotium, or fermentation product of Poria cocos (Schw) Wolf. The Poria extract contains 1-60% of the lanostane compounds by weight of the extract, and is devoid of secolanostane.