Disclosed is an oligopeptide for treating liver fibrosis and/or hepatitis B and/or improving liver function. The oligopeptide is obtained by reflux extraction via water, ethanol precipitation and isolation through a cation exchange resin column and a gelatinous resin column from a turtle shell. Pharmaceutically conventional excipients can be added to the oligopeptide prepared according to the present invention to prepare various dosage forms. The oligopeptide has good efficacy in treating liver fibrosis and improving liver function.