Provided is a method for treating a liver injury such as fibrosis, cirrhosis and hepatitis as well as a method for restoring liver function in a subject, which includes administrating to the subject a therapeutically effective amount of n-butylidenephthalide having the formula (I) as an active ingredient, or a pharmaceutically acceptable salt of ester thereof:wherein R is ═CHCH2CH2CH3, and n-butylidenephthalide (I) is E form, Z form or a mixture thereof.