This disclosure relates to application of hedgehog pathway inhibitor in treatment for fibrosis diseases. Specifically, the disclosure provides a method for treating and preventing fibrosis diseases. The method mentioned includes administering subjects in need with an effective amount of a hedgehog pathway inhibitor, wherein said hedgehog pathway inhibitor is a compound represented by the Formula (I) or a pharmaceutically acceptable salt or prodrug thereof:wherein C cyclic group, D1-D4, Q1, Q2, R5 are defined herein.