The present invention provides a pharmaceutical composition for preventing and treating liver fibrosis or nonalcoholic fatty liver disease, comprising 50 to 90% by weight of Cordyceps sinensis mycelium powder, and 10 to 50% by weight of condensed astragalus powder.