Toxicity studies, among them hepatotoxicity, are key throughout preclinical stages of drug development to minimise undesired toxic effects that might eventually appear in the course of the clinical use of the new drug. Understanding the mechanism of injury of hepatotoxins is essential to efficiently anticipate their potential risk of toxicity in humans. The use of in vitro models and particularly cultured hepatocytes represents an easy and robust alternative to animal drug hepatotoxicity testing for predicting human risk. Here, we envisage an innovative strategy to identify potential hepatotoxic drugs, quantify the magnitude of the alterations caused, and uncover the mechanisms of toxicity. This strategy is based on the comparative analysis of metabolome changes induced by hepatotoxic and non-hepatotoxic compounds on HepG2 cells, assessed by untargeted mass spectrometry. As a training set, we used 25 hepatotoxic and 4 non-hepatotoxic compounds and incubated HepG2 cells for 24 h at a low and a high concentration (IC10 and IC50) to identify mechanism-related and cytotoxicity related metabolomic biomarkers and to elaborate prediction models accounting for global hepatotoxicity and mechanisms-related toxicity. Thereafter, a second set of 69 chemicals with known predominant mechanisms of toxicity and 18 non-hepatotoxic compounds were analysed at 1, 10, 100 and 1000 µM concentrations from which and based on the magnitude of the alterations caused as compared with non-toxic compounds, we defined a “toxicity index” for each compound. In addition, we extracted from the metabolome data the characteristic signatures for each mechanism of hepatotoxicity. The integration of all this information allowed us to identify specific metabolic patterns and, based on the occurrence of that specific metabolome changes, the models predicted the likeliness of a compound to behave as hepatotoxic and to act through a given toxicity mechanism (i.e., oxidative stress, mitochondrial disruption, apoptosis and steatosis) for each compound and concentration.Supplementary InformationThe online version contains supplementary material available at 10.1007/s00204-023-03474-8.