Disclosed is a use of trimethazine in the preparation of drugs for preventing and treating liver diseases. Trimethazine is capable of inhibiting activation of resting T-cells to activated lymphocytes, reducing release of cytokines, and reducing hepatocyte injury caused by immune system inhibiting fatty acid metabolism in hepatocytes, and optimizing the energy process in hepatocytes and maintaining normal function of mitochondrial permeability transition pores, and reducing hepatocyte apoptosis. Trimethazine has the efficacy of maintaining the liver functions, and reducing transminase (comprising glutamic pyruvic transaminase, glutamic oxalacetic transaminase, etc.).