The disclosure is related to a method for treating stroke or reducing nerve injury, which comprises administering to a subject in need thereof a therapeutically effective amount of a compound isolated and purified from Antrodia camphorata fruiting body by methanol extraction. In particular, the compound is dehydroeburicoic acid, dehydrosulphurenic acid or 4,7-Dimethoxy-5-methyl-1,3-benzodioxole.