Disclosed is a use of trimethazine in the preparation drugs for preventing and treating liver diseases. Trimethazine can inhibit the activation of silent T-cells to activated lymphocytes, reduce the release of cytokines, and reduce liver cell immune injuries; inhibit the fatty acid metabolism in the liver cells, and optimize the energy process in liver cells; and maintain the normal function of the mitochondrial permeability operation pore canal, and reduce the apoptosis of liver cells. Trimethazine has the efficacy of maintaining the liver function, and reducing the transaminase (comprising glutamic pyruvic transaminase, glutamic oxalacetic transaminase, etc.).